XF 2.2 JavaScript block


Active member

I'm looking for a way to block access to the site or even block some parts of the site, i know xf uses a notice but i want to step it up a bit.

I was using the below code but after checking the site with seo site checkup this was hurting my seo (Google gods again less information is good to them :D)

<noscript><h3> You must have JavaScript enabled in order to use this website. Please

      enable JavaScript and then click home page in order to continue. </h3>

      <meta HTTP-EQUIV="refresh" content=0;url="javascriptNotEnabled.php"></noscript>

Is their a friendly way to block users that block JavaScript.


Well-known member


Active member
embedding head code in body syntax is not valid html.

So, i would say re-think what you want to block and why, or better, why not make it compatible without JS?
google "graceful degradation:
My idea was to block the hole site with like a page or error if a user was to turn off JS something like twitter does:

Screenshot 2022-03-11 233821.png
Idea i had thought it worked but since google failed to tell me this was an issue then i had 0 ideas until checking bing even though people seem to hate bing :D it saved the day.