Welcome Guest, Not a member yet? Register   Sign In
When Javascript is disabled...
#1

[eluser]iainco[/eluser]
...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!
#2

[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".

HTH
#3

[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.
#4

[eluser]iainco[/eluser]
Thanks for your help guys




Theme © iAndrew 2016 - Forum software by © MyBB