Christopher
Christopher

Reputation: 2103

Javascript detection script

I need a JS detection script that will redirect users who do not have JS enabled to a different page without JS.

Upvotes: 1

Views: 383

Answers (1)

JAL
JAL

Reputation: 21563

Kind of a paradox, isn't it? The answer can't be a script, since no scripts would be executed if JS is not enabled.

You can embed HTML inside a noscript tag, and this content will only be included if JS is not enabled.

<noscript><meta http-equiv="refresh" content="0;url=http://example.com/no_js.html/"></noscript>

Upvotes: 11

Related Questions