Skip to main content
Known Participant
February 11, 2018
Answered

Pagespeed Analysis, Reduce blocking resources...

  • February 11, 2018
  • 4 replies
  • 4826 views

Reduce blocking resources

(L)Optimize the order of styles and scripts

The following external CSS files were included after an external JavaScript file in http://satgraphics.com/. To ensure CSS files are downloaded in parallel, always include external CSS before external JavaScript.

https://maxcdn.bootstrapcdn.com/…/bootstrap.min.css

http://satgraphics.com/css/bootstrap-custom.css

I then repositioned the “bootstrap-custom.css” before the “bootstrap.min.css” and ran PageSpeed again.

Continued to receive the error, although I had made the change, which is reflected on the second report, as follows:

The following external CSS files were included after an external JavaScript file in http://satgraphics.com/. To ensure CSS files are downloaded in parallel, always include external CSS before external JavaScript.

http://satgraphics.com/css/bootstrap-custom.css

https://maxcdn.bootstrapcdn.com/.../bootstrap.min.css

This topic has been closed for replies.
Correct answer BenPleysier

Move the following to the bottom of your document just above the closing BODY-tag

<script async src="https://www.googletagmanager.com/gtag/js?id=UA-112286733-1"></script>

<script>

  window.dataLayer = window.dataLayer || [];

  function gtag(){dataLayer.push(arguments);}

  gtag('js', new Date());

  gtag('config', 'UA-112286733-1');

</script>

4 replies

Jon Fritz
Community Expert
Community Expert
February 12, 2018

Maybe I'm missing something here, but the error appears to be telling you to move both of the .css files mentioned to a position in the code before a <script> tag containing a link to a .js file.

Have you done that, or have you only reordered your two .css files as described?

Known Participant
February 12, 2018

Joh Fritz II,

I did only as I described. I reordered the "bootstrap-custom.css" appear before"bootstrap/3.3.7/css/bootstrap.min.css".

The only script that appears above those (named PageSpeed erro links) is that of "googletagmanager". To best of my knowledge, that GTA script is in proper position.

BenPleysier
Community Expert
BenPleysierCommunity ExpertCorrect answer
Community Expert
February 12, 2018

Move the following to the bottom of your document just above the closing BODY-tag

<script async src="https://www.googletagmanager.com/gtag/js?id=UA-112286733-1"></script>

<script>

  window.dataLayer = window.dataLayer || [];

  function gtag(){dataLayer.push(arguments);}

  gtag('js', new Date());

  gtag('config', 'UA-112286733-1');

</script>

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
rayek.elfin
Legend
February 12, 2018

According to gtmetrix your images would benefit from better optimization. Use a good jpg optimization utility.

Known Participant
February 12, 2018

rayek.elfin,

I'm aware and in process to that end. As I'm using images sized from a previous site, I wasn't sure of which I would use and which I would discard, saving that decision for the final phase. And, since the site is image heavy it will be time consuming and mind numbing, but I'm out of excuses to procrastinate.

Thanks for your input.

Known Participant
February 11, 2018

Thanks Nancy,

I was getting close to accepting that I was not going to get them all. In this case, almost all will suffice.

Again,

Thank You

Nancy OShea
Community Expert
Community Expert
February 11, 2018

Just so you understand, getting a perfect score on Page Speed is impossible.  You would need to remove or defer loading all unnecessary CSS & JavaScript references until the landing page has fully loaded.  For most sites, that's not possible unless you have a separate plain vanilla landing page.

Nancy O'Shea— Product User & Community Expert