I’m using wordpress and a theme and made some changes into this theme, when I want to increase page speed Google Page Speed tester says that I need to remove all blocking scripts and styles.
I don’t know what is the Render blocking and how to solve this can any one guide me to fix the important issue.
Thanks
I solve Remove render-blocking JavaScript as follows:
Lets say for example your
<head>
section looks like thisjust move the script files to the bottom of the document, or the footer.php file, like so
If you move all the scripts out of the head and to right before the
</body>
closing tag, then that should get rid of that message in google page speed.Please be aware that it might still give an error/message about CSS stylesheet has render blocking.. well, I would just ignore that , since I want my css to render before the document, so I would not remove that from the
<head>
.These solutions are just partial solutions.. methods of inlining, placing scripts at the bottom, using async or defer are not the best solution. If u wanna letting the page load first and then loading the js.
for JS place this code after the </body > tag
Src: Patrick Sexton
https://varvy.com/pagespeed/render-blocking.html