Jump to content

noscript


The Little Guy

Recommended Posts

if I were to use the <noscript></noscript> tags, is there a way using php to check if the info between this ran?

 

basically I have JavaScript built into my site, and for the site to work it MUST have JavaScript enabled.

 

If it is not enabled, I would like to hult the loading of the page, and just say JavaScript must be enabled to view the page.

 

any way to do this???

Link to comment
https://forums.phpfreaks.com/topic/61761-noscript/
Share on other sites

I need to do something similar...if Javascript is disabled then redirect the user to a different page...

 

Come to think of it, I just had an idea as I was posting this... :D

 

<noscript>
<?php
header('location: nojs.php');
?>
</noscript>

 

Not sure if that's exactly what you're looking for though.

Link to comment
https://forums.phpfreaks.com/topic/61761-noscript/#findComment-307500
Share on other sites

Which one is better???

 

 

<noscript>
<?php
header location("nojs.php");
?>
</noscript>

does this work? or will it actually do the refresh no matter what??

 

This one works for sure (except for IE i just realized):

<noscript>
<meta http-equiv="refresh" content="0;url=http://mysize.com/nojs.php">
</noscript>

Link to comment
https://forums.phpfreaks.com/topic/61761-noscript/#findComment-307504
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.