How to Show Popup to Enable JavaScript in Browser

 

 Hi to all, in this article I am going to tell you all about how to show popup to users to enable JavaScript in browser for Blogger, WordPress and other websites easily in just few minutes.


When JavaScript is blocked in the browser, a popup will appear on the screen and ask website users to enable the JavaScript before accessing your website content.


Likewise you can force users to enable JavaScript in the browser settings and once the JavaScript is enabled then automatically the popup will go away and if user again disable the JavaScript then the popup comes again.


This will help you to improve your website security and all the scripts will work in the browser perfectly and it helps especially when you are using anti ad blocker, copy paste disable script and other scripts on your website.


If you add the below provided code in your website then it will auto detect if JavaScript is disable in the browser and shows a popup to your visitors to enable the JavaScript.


Read the below provided steps carefully before adding any code in your website theme editor, so read the complete article till end.


How to Force Users to Enable JavaScript in Browser





Steps to Force Users to Enable JavaScript in Blogger



Step-1: First of all you need to login to your blogger website dashboard.




Step-2: Now go to blogger dashboard -> Click on theme section -> Click on arrow icon -> Select backup -> Click on download theme.




Step-3: Now again go to blogger dashboard -> Click on theme section -> Click on arrow icon -> Select Edit HTML -> Blogger theme editor.




Step-4: Copy below provided noscript cod and paste the copied noscript code above closing body tag.





Step-5: After adding the code, Click on save button.


Step-6: You have successfully added the code in your blogger website and from now, if any users disables the JavaScript, then a popup message displays and ask to enable it, and it will not go until you enable the JavaScript for the website.








Steps to Force Users to Enable JavaScript in WordPress



Step-1: First of all you all need to login to your WordPress website dashboard by using your login credentials.




Step-2: Here you can use a plugin like Header Footer Code Manager or any other code management plugin or you can directly paste it in the theme editor.


Step-3: Here I am using HFCM Plugin to force users t enable JavaScript in browser.


Step-4: Here open HFCM plugin dashboard.


Step-5: Now click on "Add New Snippet".


Step-6: Here in this page it shows, few textboxes and you need to fill information in those textboxes, and textboxes are:

  • Snippet Name
  • Site Display
  • Exclude Page
  • Exclude Posts
  • Location
  • Device Display
  • Status
  • Snippet / Code




Step-7: Here you need to enter the information in the boxes like,

Snippet Name: Force Enable JS

Site Display:  Select Site Wide

Exclude Page: -

Exclude Posts: -

Location: Select Footer

Device Display: Select Show on all devices

Status: Select Active

Snippet / Code: Paste the below provided code here


Step-8: Now copy the below provided code and paste the copied code in snippet / code.





Step-9: Now you can modify the code as per your website and then click on save button.


Step-10: You have successfully added the code in your WordPress website and from now, if any users disables the JavaScript, then a popup message displays and ask to enable it, and it will not go until you enable the JavaScript for the website.






Note:


If you get any error while saving the code in blogger website, then you need to restore your backup code again and need to follow the same process as provided in above steps.


In WordPress you can use a plugin like Header Footer Code Manager or any other code management plugin or you can directly paste it in the theme editor.




Conclusion


I hope that you understood about how to show popup to users to enable JavaScript in browsers for blogger and WordPress websites easily in just few minutes.





Next Post Previous Post

Cookies Consent

This website uses cookies to analyze traffic and offer you a better Browsing Experience. By using our website.

Learn More