Explore the problem of javascript unavailability

Source: Internet
Author: User

The first time I encountered this problem was still in the era where DHTML was prevalent. we have nothing to do with browsers. We have added various animated menus and 3D labels (we have learned to stop using these labels), but some people always tell us that javascript is unavailable.

Who disabled javascript?

The first question to be asked is where the javascript environment is unavailable. Below are some possible answers:

The security system, such as noscript or the company agent, filters out javascript;
Function phones, such as old-style BlackBerry (I still remember switching old-style BlackBerry to Opera Mini for a better online experience );
In mobile application environments, images and scripts are sometimes split and processed;
In areas with limited traffic or slow access;
Javascript is disabled for personal reasons;
People who hate pop-up ads and other strong ads.
As you can see, javascript is disabled for a variety of reasons, such as passive and active, so it cannot be said that only people who use the network may encounter such problems.

Why is javascript disabled?

As listed above, javascript is disabled for a variety of reasons. if it is intentionally disabled, I guess there are three main reasons, namely security concerns, AD fatigue, and slow connection.

Security considerations are reasonable. almost every client-side attack uses javascript (in most cases, the plug-in vulnerability is exploited ). java is of course the biggest security vulnerability currently, but using javascript will also pose a security threat to websites with vulnerabilities, unprotected or outdated browsers and operating systems.

Slow connection is an interesting reason. we use javascript to accelerate the client experience. an example of using js initially is to verify the form on the client side to avoid unnecessary service cycles on the server side.

If you are currently in a poor connection (for example, a wireless connection or a poor 3G connection) and you want to use Google Reader or Gmail, you can only get an incomplete page, at this time, only lower versions can work better.

For both parties

It is a good experience to connect to users based on the environment. this is also a problem of progressive enhancement. this is not a very profound thing. It is very simple and completely pragmatic.

Using Event authorization is very simple. You can click the handlers of the parent element to write your own HTML, and use innerHTML or other faster Update Technologies.

Why is this a problem?

Frankly speaking, I don't know. maybe it's because I'm too outdated, maybe it's because I 've been disappointed with my browser and network connection once, maybe it's because I just want to be safer. I just don't understand why people only want js solutions. In fact, js is only used to provide some enhancement functions.

Confusing application edge Cases

What people often wonder about is that "applications require javascript ". if we are honest enough, we will find that such applications are actually very few. if you have to say something, only photoshop in the browser or some other editors (such as videos and IDE in the browser) need to rely on javascript. the rest can be solved through reload and some components on the server.

Let's face this fact-in Node. in the js era, the server can also be written in javascript. two years ago, Dav Glass of Yahoo showed that if a tool library is written into a redundant environment, you can reuse these tools on both the client and server.

The real reason why "javascript is needed for an application" seems to be another reason, not a non-technical one.

The real reason why "javascript is needed for Applications"

As javascript can be disabled for many reasons, javascript is required for applications.

You only know about js and think that people should upgrade their browsers. This is understandable, but it is narrow and easy to fail.
Teams that build applications with you do not have the server-side skills. You hope to complete the application at a low cost. this may be effective, but it may double the development time and money. plan such development in advance.
You want to write the application as soon as possible, and you know that you will rewrite the application later. this is a common phenomenon, especially when you succeed. may God bless you, never let people know that you will stay for a long time.
Your application will run in a pure js environment. this means that you do not need to use js to complete your application. A good example is Air applications. but you must ensure that this environment will not be faulty in the future.
Your application does need js to run. in this case, do not provide it to users without js. explain to people why and how to do it (try to avoid telling people that they need to enable js because they may not be able to do it at all) and redirect to your application using js.

Summary

In short, the question of javascript dependency is not just a technical reason, but it raises questions about the old technical practices and has a great impact on maintainability.

It can be said that if we can ask "Why do we need JavaScript" instead of "why do people don't have JavaScript", the seminar on this issue is more effective. if our technology can well adapt to different needs, it is meaningless to blame people for keeping up with network development.

It is meaningless to show users that they can solve the problem by enabling or disabling components in the browser. when a common user is stuck in your application, this is not a way to tell the user what happened.

Maybe all these problems will not be a problem after node becomes mature and popularized. I will be happy to see this.

Original article: That "javascript not available" case

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.