views:

36

answers:

3

i am trying to redirect users without javascript enabled to our help page (help.php), specifically the part that talks about enabling javascript (help.php#nojavascript).

however, my meta refresh is not working! it keeps on refreshing the same page! i tried redirecting to a different page with a .html extension instead, and that works, so why doesn't this work?

        ...
  </script>
  <!-- if user doesn't have JS enabled, take them to help page -->
  <noscript>
  <meta http-equiv="Refresh" content="3;url=help.php" />
  </noscript>
  </head>
        ...
+1  A: 

Try to use an absolute path:

<META HTTP-EQUIV="Refresh" CONTENT="3;URL=http://www.some.org/some.html"&gt;
quantumSoup
It should work with relative paths as well, though....
Pekka
still a no-go. it works with `.html` pages but not my `help.php` page
Garrett
+1  A: 

For one thing, try taking it out of the NOSCRIPT element. Browsers with scripting enabled are supposed to ignore everything inside NOSCRIPT.

Seva Alekseyev
that's the point; i want users without scripting enabled to be redirected to my help page which teaches them how to enable it
Garrett
First make sure the META element works properly as is, then debug the meta-inside-noscript case. Right now, you're not even sure which part misbehaves.
Seva Alekseyev
A: 

i was including a file that redirected the user to home.php =( sorry!

Garrett