Permalink
Browse files

Merge pull request #3 from csswizardry/master

Further optimisations
  • Loading branch information...
2 parents c3bb1e3 + e40019a commit 50c1d9f610d1e18b893ec9bc81b1fa989dc486a0 @Domw committed Sep 9, 2011
Showing with 23 additions and 11 deletions.
  1. +9 −0 .htaccess
  2. +8 −0 index-commented.html
  3. +5 −9 index.html
  4. +1 −2 style.css
View
@@ -0,0 +1,9 @@
+#If we're after some hardcore optimisations the least we can do is gzip it, G!
+#Gzip via http://salscode.com/web-resources/gzip-htaccess
+<ifmodule mod_deflate.c>
+AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
+</ifmodule>
+#End Gzip
+
+#Set character encoding for HTML files in here rather than in-page
+AddCharset UTF-8 .html
View
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<!-- Dropping HTML, HEAD and BODY elements -->
+<title></title>
+<!--[if lt IE 9]><script src=html5-shim.js></script><![endif]--> <!-- Unquoted attributes where possibe -->
+<link href=style.css rel=stylesheet> <!-- Drop self-closing slashes -->
+<p id=test>Test <!-- Dont't close eleements that you don't have to -->
+<p>Boom!
+<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"></script> <!-- Dropping the hhtp means resources are served over the same protocol they are requested and obviously saves bytes. -->
View
@@ -1,11 +1,7 @@
<!DOCTYPE html>
-<html>
-<head>
<title></title>
-<!--[if lt IE 9]><script src="html5-shim.js"></script><![endif]-->
-<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"></script>
-<link href="style.css" rel="stylesheet" />
-</head>
-<body>
-</body>
-</html>
+<!--[if lt IE 9]><script src=html5-shim.js></script><![endif]-->
+<link href=style.css rel=stylesheet>
+<p id=test>Test
+<p>Boom!
+<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"></script>
View
Oops, something went wrong.

0 comments on commit 50c1d9f

Please sign in to comment.