HTML24 / HTML5-template

Standard HTML5-based template for HTML24.
4 stars 4 forks source link

High Performance Web Sites: Rule #6 #16

Closed lsv closed 11 years ago

lsv commented 11 years ago

Javascript should be at the bottom

http://developer.yahoo.com/blogs/ydn/high-performance-sites-rule-6-move-scripts-bottom-7200.html

tomgud commented 11 years ago

That's a good point. When we use this template we like to have stuff in the same place as to keep it simple to modify css and js files at the same time. During development we often add libraries or new stylesheet so it's nice to keep it in one place.

Then when we move from development to production we move blocking javascript files to the bottom to optimize for speed. We also change stylesheets and javascript libraries to minified version to further optimize for speed.

But it is a really great point and a point we will take into consideration when we write our speed optimization chapter of the HTML5 template guidelines in the README.md file :smiley:

lsv commented 11 years ago

Thats what SASS/LESS is for :) 1 stylesheet file for everything

And use coffeescript/require etc for having 1 javascript file

DKvistgaard commented 11 years ago

This template is intended for everyone to use. This includes people who doesn't know anything about SASS, LESS, coffeescript or anything similar. Therefore this isn't a part of our standard template.

Again you are stating a good point, but there are various reasons for us not to have it as a part of our standard template. We do, however, like to use languages like these. :)