XF 2.2 JavaScript block

swiftyste

Active member
Hello,

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)

Code:
<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.
 

swiftyste

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

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.
 
Top