cfpb / regulations-site

(DEPRECATED) Web interface for viewing U.S. federal regulations and other regulatory information
Other
28 stars 43 forks source link

Reorganized some files in the head for performance issues #704

Closed KimberlyMunoz closed 9 years ago

KimberlyMunoz commented 9 years ago

Right now, we see this when we do a performance audit.

image

I changed the way our scripts and styles are ordered so that our inline script doesn't come between the styles and scripts. Google has a great little video on it here.

It's a small change, but hopefully has some noticeable effects on getting the page to render more quickly.

ascott1 commented 9 years ago

@KimberlyMunoz have you tested this in IE8? Before merging I just want to make sure that moving the modernizr script doesn't have any consequences.

Thanks for doing this!

KimberlyMunoz commented 9 years ago

Good catch. I'll test this morning.

KimberlyMunoz commented 9 years ago

I didn't see any issues in IE8, but I think it's better to move it before the main javascript file since we do check for pushState support in Modernizr.

ascott1 commented 9 years ago

:+1: that makes sense to me!