• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
When Javascript is disabled...

...should I do everything I can to make the site still functional, or simply re-direct to a page with instructions on how to enable Javascript again. (Ok, that is pretty lazy!)

My question comes from the fact I'm (or will be) using AJAX requests to populate content on the homepage of my site. So obviously if a user has Javascript disabled they will not be able to access the AJAX content.

Seems to me that I might have to have almost 2 versions of the same site...

I was thinking about how to tell if a request was made via AJAX or not within one of my controllers. One way I thought was having a hidden input variable that would be set different when an AJAX request is made.

Thanks for any help folks... desperate here!

[eluser]Jay Turley[/eluser]
It depends on your target audience.

If you feel confident your audience will have modern browsers with Javascript enabled and will not be using assistive technologies like screen readers, then you don't have to worry about it.

What you *could* do is the following. Lets assume you have a "recommended links" section on your home page which will be loaded through ajax.

First, generate your page with a div with an id "recommended_links". Inside it, you can provide a link to a page showing your recommended links for no script-enabled users.

Then, using Javascript, on page load, you would replace the content of the div (currently the link) with the data pulled using ajax.

This would be an example of "progressive enhancement".


[eluser]Nick Husher[/eluser]
Remember that search engines are the most active users that also have javascript disabled. If you want your site to be SEO-friendly, you might want to focus on a more progressive enhancement model.

Thanks for your help guys

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.