Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do web sites really need to cater for browsers that don't have Javascript enabled? [closed]

Tags:

javascript

Why do many professional web developers always insist on developing sites that accommodate for browsers that have Javascript disabled?

Besides tech heads and developers, most 'normal' users don't even know what it is.

like image 430
Razor Avatar asked May 05 '09 01:05

Razor


People also ask

Should websites work without JavaScript?

If we're talking about websites “working” or not with or without JavaScript, a site that is client-side rendered will 100% fail without JavaScript. It is sort of the opposite of “server-side rendered” ( SSR ) in which the document comes down as HTML right from the server.

What happens if JavaScript is disabled in a web browser?

Many Internet Web sites contain JavaScript, a scripting programming language that runs on the web browser to make specific features on the web page functional. If JavaScript has been disabled within your browser, the content or the functionality of the web page can be limited or unavailable.

Does JavaScript need to be enabled?

Need help enabling JavaScript? Most websites require Javascript to be enabled in your web browser in order to work. We have a guide that can help you enable it. Remember that JavaScript is a "per browser" setting; if you have it enabled in Chrome, you might also have it disabled in Firefox on the same computer.

Does every website use JavaScript?

No, not every single website uses JavaScript, although an overwhelming majority do use it in some way. The w3techs.com website - which tracks the trends of technologies like JavaScript - have reported that as of the beginning of 2022, an incredible 97.9% of websites do use JavaScript in some form [1].


2 Answers

Who uses browsers older than Firefox 2 or IE6?

Wrong question. It's not the age of the browser that's the problem. There are plenty of new browsers out there that don't support javascript or don't support it well, and they can be just as important as the latest safari or firefox.

Others have mentioned smartphones or lynx, but the main one in my book is Googlebot. That's a browser just like any other, and it won't run most of your javascript. Also, even if you have firefox you might use a plugin like NoScript. That's not the same thing as running with javascript disabled, but if you do things wrong you can really mess up for those users (ie, detect javascript state once at the start of a session or creation of an account, and then no longer serve javascript pages at al, even if they wanted to enable it for you). Finally, if you do any work for the US Goverment you are required by law to support certain accessibility standards that include working with javascript disabled.

like image 81
Joel Coehoorn Avatar answered Sep 19 '22 03:09

Joel Coehoorn


A few months ago I tested the user population on a mainstream million-member site I was working on, and around 10% of unique users did not have Javascript running.

Consider reversing the question: is it worth developing a site that only works for Ajax-capable users? Would you really ignore search bots, most mobiles, and a heap of other users?

Back to basics. First, create your site using bare-bones (X)HTML, on REST-like principles (at least to the extent of requiring POST requests for state changes). Simple semantic markup, and forget about CSS and Javascript.

Step one is to get that right, and have your entire site (or as much of it as makes sense) working nicely this way for search bots and Lynx-like user agents.

Then add a visual layer: CSS/graphics/media for visual polish, but don't significantly change your original (X)HTML markup; allow the original text-only site to stay intact and functioning. Keep your markup clean!

Third is to add a behavioural layer: Javascript (Ajax). Offer things that make the experience faster, smoother, nicer for users/browsers with Ajax-capable JS... but only those users. Users without Javascript are still welcome; and so are search bots, the visually impaired, many mobiles, etc.

This is called progressive enhancement in web design circles. Do it this way and your site works, in some reasonable form, for everyone.

like image 29
mattandrews Avatar answered Sep 20 '22 03:09

mattandrews