DelphiFAQ Home Search:
General :: Web publishing :: JavaScript
Code snippets to add functionality to your HTML pages, preferably cross-browser.

Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Featured Article

Detect that Javascript is disabled and reload the page then

Question:

How can I detect that Javascript is disabled and then have the page reload or redirect?

Answer:

You cannot detect this in JavaScript itself but you can use the <NOSCRIPT> section in the <HEAD> section of your page:

In the example it will redirect after 2 seconds to another URL (no_script_version.htm).

Most browsers support the REFRESH option.
..
 <HEAD>
 <NOSCRIPT>
 <META HTTP-EQUIV="Refresh" CONTENT="2;URL=no_script_version.htm">
 </NOSCRIPT>
 </HEAD>
 ..

Generated 12:02:05 on Dec 11, 2017