Jump to content
Killersites Forums

JavaScript need to be enabled.


Recommended Posts

As per the W3 spec, this isn't the purpose of the tag.



tag should be used to provide alternative content when a script is disabled; it shouldn't be used to tell the user to switch javascript on. What if the user can't switch javascript on? What if they're browsing on a mobile user-agent? What if they're using a screen reader, or a dozen other devices that don't support javascript? What about search robots trying to index your site?


These days there's no excuse not to use progressive enhancement techniques; develop your site so that it's fully accessible with javascript off, then use javascript to put the icing on the cake.


The proper strategy to do what you're suggesting would be something like:


  • Develop the site so that it is fully functional with Javascript off
  • Add a div to the top of the page inviting users to switch javascript on for a better user experience
  • Hide that div using javascript on page load.


That way, everybody sees content, and users who can get a better experience, will. For an example of how it should be done, check out Stack Overflow with js on and off.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...