brianmaierjr / long-haul

A minimal, type-focused Jekyll theme.
http://brianmaierjr.com/long-haul
MIT License
674 stars 776 forks source link

Render-blocking Javascript and other speed improvements #9

Closed aav7fl closed 9 years ago

aav7fl commented 9 years ago

I was wondering if you could take a look at improving a few speed resources. Such as moving the JavaScript loading to the footer (modernizr.custom.15390.js) to improve load times/load them in parallel or optimizing the CSS delivery.

The website that I'm referring to that shows these suggestions is https://developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Fbrianmaierjr.com%2Flong-haul%2F

brianmaierjr commented 9 years ago

Hey @aav7fl,

Modernizr will be staying in the head. This is an excerpt form the modernizr site:

Drop the script tags in the <head> of your HTML. For best performance, you should have them follow after your stylesheet references. The reason we recommend placing Modernizr in the head is two-fold: the HTML5 Shiv (that enables HTML5 elements in IE) must execute before the <body>, and if you’re using any of the CSS classes that Modernizr adds, you’ll want to prevent a FOUC.