Archived topic
Optimizing order of styles & scripts
4 replies · Started by Howard on July 14, 2019
Hi Tom:
A problem or error from GT metrix (optimize order of styles and scripts) just came up.
Although I googled how to check if the html is correct ( or somehow changed due to a plugin problem- since removed) I’m not knowledgeable enough to get in the pages of my html to work on it...( apparently wp paid site fixing companies don’t want to bother— or indeed, understand this presumably “ simple” check and/or correction! See here:
Check my html to see if scripts are in proper order: namely:
“This can be done very simply by editing a couple of lines in the HTML for your webpage. Styles and scripts are called from the head section of the HTML and the following shows you an example of how to optimize the order:
‘ <head>
<title>title</title>
<style>
css code should be here
</style>
<script>
javascript should be here
</script>
</head>’
Any way you could check or help me out?
Regards
Howard
Hi there,
I'm not sure I fully understand. WordPress should order your styles and scripts properly by default. What exactly are you hoping to change?
Let me know :)
Hi Tom:
From GT Metrix:
The following inline script blocks were found in https://www.thesoundadvocate.com/2019/07/tellurium-q-black-ii-speaker-cables-complete-review/ between an external CSS file and another resource. To allow parallel downloading, move the inline script before the external CSS file, or after the next resource.
Inline script block #1
Howard
It's hard to see what it is since your HTML is all minified, but your caching plugin should re-arrange all of the javascript by default if it combines all the files into one.
Resolved