1. Using The <noscript> Tag
With HTML5, you can even add the noscript tag to the head of the document, prior to that, it was limited only to the body tag. This gives it another edge over all other methods, since you can now declare styles even before the content of the page has loaded.
- Turn OFF Autosave In WordPress And Reduce Database Size
- 22 Things To Do For A Faster WordPress Website
- Optimizing Database For WordPress Websites Automatically [Free Plugin]
- How to Edit .htaccess File from WordPress Dashboard Itself
- Doing Complete SEO Of Your WordPress Website With WordPress SEO By Yoast
document.getElementsByTagName("html").className = document.getElementsByTagName("html").className.replace(/(?:^|\s)no-js(?!\S)/g, ' js')
This code will replace all the instances of ‘no-js’ with ‘js’ from the class attribute of the HTML tag.
This is what I am implementing on all my projects. Do let me know if you have any better way of doing it.