How do you get your scripts and codes where they need to go?
-
Sometimes my pages load fast and sometimes they load extremely slow, so I started reading a book called “Speed up WordPress” by Michel Gerard. In chapter 6 he recommends installing the Autoptimize plugin and to start by checking:
Optimize HTML code
Optimize Javascript code
Optimize CSS code
and
Generate data: URI’s for imagesBut, when I have “Generate data: URIs for images?” checked, I lose my categorys and recent post links in the sidebar – they disappear. Any idea why that happens and why my sidebar would have anything to do with images?
And he said in the book that after checking those I should see all of my CSS code grouped together in one place at the top of my source code and all of the javascript grouped together in one place at the bottom of my source code. But, if I go to Edit – FIND in the source code window, I can find or search for “css”, or “javascript” and I find them in different places all down the page, neither of them are all grouped together at the top or bottom. Not sure why that is, or is it normal these days? From the FAQ page, if I’m understanding it right, it sounds like it might be normal these day due to some changes to what Google wants.
So that leaves me wondering what to do. How do I know which scipts and codes need to be where and how to get autoptimize to put them in the right spots?
…
When I just check for it to optimize the HTML, javascript, and css, Google Pagespeed Insights says:(mobile)
Eliminate render-blocking JavaScript and CSS in above-the-fold content
Your page has 1 blocking script resources and 4 blocking CSS resources.(Destop)
Eliminate render-blocking JavaScript and CSS in above-the-fold content
Your page has 1 blocking script resources and 4 blocking CSS resources.They both also say:
Remove render-blocking JavaScript:
* https://s.gravatar.com/js/gprofiles.js?u&ver=4.4.1Can I use Autoptimize some how to remove that render-blocking JavaScript and optimze the delivery of the other 4 CSS resources?
If I check “force javascript in head” It adds another blocking script to the remove render-blocking javascript list.
If I uncheck “optimize css code”, I have even more than just 4 CSS resources that need optimized.
- The topic ‘How do you get your scripts and codes where they need to go?’ is closed to new replies.