One thing that html5 boilerplate does come with that other starting point templates generally don’t is server sided files. Check out these awesome .htaccess snippets that can easily improve your site.
X-UA-Compatible Server sided
This is the same as the html version mentioned above, forcing the latest rendering engine in IE, and Chrome Frame if it exists. The benefit of including this in your .htaccess file is that it saves you having to declare this in the head of each and every html document you produce.
1 <IfModule mod_headers.c>
3 Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie
Gzip compression allows us to drastically reduce out file sizes. This .htaccess snippet does the gzipping for us.
2<IfModule mod_deflate.c>
3 # html, xml, css, and js:
4 AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript text/javascript application/javascript application/json
6 <FilesMatch "\.(ttf|otf|eot|svg)$" >
7 SetOutputFilter DEFLATE
Expiry date for cache filetypes
When we cache our files on the user’s machine, we may want to specify how long they remain there, depending on how often we change them ourselves. This snippet provides basic times for common file types, some of which you may wish to change for your own site.
1# these are pretty far-future expires headers
2# they assume you control versioning with cachebusting query params like
3# <script src="application.js?20100608">
4# additionally, consider that outdated proxies may miscache
5# www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/
6# if you don't use filenames to version, lower the css and js to something like
7# "access plus 1 week" or so
8<IfModule mod_expires.c>
9 Header set cache-control: public
12 # Perhaps better to whitelist expires rules? Perhaps.
13 ExpiresDefault "access plus 1 month"
14 # cache.manifest needs re-reqeusts in FF 3.6 (thx Remy ~Introducing HTML5)
15 ExpiresByType text/cache-manifest "access plus 0 seconds"
17 ExpiresByType text/html "access"
19 ExpiresByType application/rss+xml "access plus 1 hour"
20 # favicon (cannot be renamed)
21 ExpiresByType image/vnd.microsoft.icon "access plus 1 week"
22 # media: images, video, audio
23 ExpiresByType image/png "access plus 1 month"
24 ExpiresByType image/jpg "access plus 1 month"
25 ExpiresByType image/jpeg "access plus 1 month"
26 ExpiresByType video/ogg "access plus 1 month"
27 ExpiresByType audio/ogg "access plus 1 month"
28 ExpiresByType video/mp4 "access plus 1 month"
30 ExpiresByType font/ttf "access plus 1 month"
31 ExpiresByType font/woff "access plus 1 month"
32 ExpiresByType image/svg+xml "access plus 1 month"
34 ExpiresByType text/css "access plus 1 month"
35 ExpiresByType application/javascript "access plus 1 month"
36 ExpiresByType text/javascript "access plus 1 month"
39# Since we're sending far-future expires, we don't need ETags for
41# developer.yahoo.com/performance/rules.html