Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do you plan for javascript being off?

I'm coding a fairly large and complex site by myself, so do you think I need to support javascript being turned off?

Its a lot of extra work supporting full page postbacks for stuff I could quickly do with JSON and ajax.

like image 592
Sudhir Jonathan Avatar asked Oct 16 '09 12:10

Sudhir Jonathan


People also ask

Should JavaScript be on or off?

Should You Disable JavaScript? While JavaScript can be exploited by hackers, you can absolutely remain safe from hackers even without disabling it. You can choose to disable it when you think a website is bloated with JavaScript, giving you an unpleasant experience.

Do I need JavaScript turned on?

Yes, you probably need JavaScript enabled - in most cases... Every web browser comes with JavaScript enabled by default, and that's probably a pretty good sign that it's ok for most people to just leave it enabled.

How many people turn off JavaScript?

You might have heard that the percentage of users without JavaScript is approximately 1% and that these people actively turn it off. And on that basis that it's okay to exclude them. First of all, 1% of a large number is still a large number.

Can you use the internet without JavaScript?

The web is really fast without JavaScript. There aren't any ads. No auto-playing videos or “tell us your email address” pop-ups. But… a lot of websites don't work at all.


1 Answers

I think you should support that. In fact, if your site involves SEO and bot indexing your site and all that, you SHOULD support javascript off.

As a modern web designer, you should first develop your site to be able to support Javascript OFF. then slowly add on effects and Javascript enhancements.

Example would be like:

<a href="page.php?p=2">Continue</a>

Then upgrade to:

<a href="page.php?p=2" onclick="doajax();return false;">Continue</a>

So say if a Javascript user clicks on the link, the AJAX is done but the usual link is disabled. However if a Javascript-OFF user clicks on the link, the user is redirected to the correct page with the same content that would be displayed to the javascript user.

If you're doing postbacks, you can do the same way for both AJAX or not.

The term that you build the site with no Javascript first, then add on the Javascript and AJAX features is called "Progressive Enhancement".

like image 80
mauris Avatar answered Sep 19 '22 23:09

mauris