Javascript error message using <meta> tags

T

Taras_96

Hi everyone,

We' ve come to the conclusion that we wish the user to be directed to
an error page if javascript is disabled <enter comment about how a
webpage shouldn't rely on javascript here :) >. I've read quite a few
posts on how to do this, but none meet my need (the two main
suggestions was set a jsEnabled variable in a <script> section of the
HTML and read it in PHP, and the other suggestion was by default
loading the non js page, and use js to redirect to the js page - I
didn't like either of them).

The behavoiur I desire is this: if(javascriptEnabled){print out
page;}else{redirect to you need to enable javascript page;}

I came up with the idea of using a meta tag in a <noscript> section,
and was hoping to get suggestions from this newsgroup. What I'm
suggesting is essentially:

<html>
<noscript>
<meta http-equiv="refresh" content="2;url=http://webdesign.about.com">
</noscript>

QST - do you have to put the absolute URL in, and can the time be zero?

The W3C says that: "Note. Some user agents support the use of META to
refresh the current page after a specified number of seconds, with the
option of replacing it by a different URI. Authors should not use this
technique to forward users to different pages, as this makes the page
inaccessible to some users. Instead, automatic page forwarding should
be done using server-side redirects." Is this because only *some* user
agents can forward the page?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top