سؤال

I want to disallow access to my website when the user does not have Javascript. I do not with to simply display a message. How would I go about doing this? None of the other questions are quite the same in the sense of disallowing access.

Something like this:

<noscript>
Redirect to another page.
</noscript>

But I've seen that this is not good to do? I repeat though, I do not simply want to display a message.

Thanks.

هل كانت مفيدة؟

المحلول

You may try this:-

<noscript>
<a href="">Click here to continue</a>
</noscript>

or

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

نصائح أخرى

Here is an solution from another post. <meta http-equiv="refresh" content="0; url=http://example.com/">

  1. Have your landing page be your NON-JavaScript warning page.
  2. Include a peice of JavaScript called from onload to re-direct to your REAL page (where you assume the end-user has JavaScript).
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top