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.
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.
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:
Then upgrade to:
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".
The question is, Are you ok with 5% of your users losing the functionality of whatever you are putting into JavaScript? (assuming whatever you are doing doesn't do graceful degradation/progressive enhancement etc...)
If you answer no, then spend the time. I do like the point of asking users to turn JavaScript on. At least then they are aware that they have an option to turn on whatever they are missing.
We do, but we have to strictly follow 508 compliance (accessibility for handicapped people). JavaScript causes difficulty for people who must use "readers" (programs which read the page, because the person can't see), so we must have a no JavaScript option.
When developing web pages, I always develop with the assumption that JS is disabled. With that being said, there are many enhancements that require JS, so it is important to let the user know by using the noscript tag.
Generally, no. But it also depends on the type of application. If you're doing a highly windowed ("rich") application then it doesn't necessarily make sense to allow for it. To put it another way: the effort of doing so might be significant where the use case is unlikely/uncommon.
If you're doing an app where you control the user's environment (eg company intranet) then you really don't need to.
If you're doing a "normal" Web site where Javascript is largely decorative then you might but really, a site working without Javascript is largely incidental. If it happens to work, great. If not, well that's life.
Lastly, if your userbase is really large then it might be worth it. GMail is a Javascript-heavy site yet it has a plain HTML version, probably because it has so many users that the 1-2% of the population who disable Javascript are significant enough to cater for.
You need to write server-side code in any case to handle the posts, whether they are from AJAX or not.
So why not code according to the DRY principle, and reuse the same logic for standard postbacks and AJAX requests?