6. Smush.it
Make PNGs smaller
(But not so much: worth it if automated?)
Thursday 2 December 2010
7. Use Google’s CDN for performance
Adjusted code from HTML5 boilerplate
{* Grab Google CDN's jQuery and jQuery UI. fall back to local if necessary *}
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/
jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">!window.jQuery && document.write('<script
src="/modules/core/js/jquery/jquery-1.4.2.min.js" type="text/javacript"></
script>')</script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/
jqueryui/1.8.2/jquery-ui.min.js"></script>
<script type="text/javascript">!window.jQuery && document.write('<script
src="/modules/core/js/jquery-ui.js" type="text/javacript"></script>')</
script>
Thursday 2 December 2010
8. To summarize, if you worry about
performance, don't use conditional
comments.
Stoyan Stefanov
phpied.com
Thursday 2 December 2010
9. Empty conditional comments = non-blocking
<html lang="{$LANG}">
<head>
<!--[if IE]><![endif]-->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta http-equiv="content-type" content="text/html; charset=iso-8859-15" />
(Also note: stepping away from IE=IE7, always use latest version. Use Chrome frame if available. Advance the web!)
http://www.phpied.com/conditional-comments-block-downloads/
Thursday 2 December 2010
10. Better: don’t include files in conditional comments at all
Code from HTML5 boilerplate
<!--[if lt IE 7 ]> <body class="ie6"> <![endif]-->
<!--[if IE 7 ]> <body class="ie7"> <![endif]-->
<!--[if IE 8 ]> <body class="ie8"> <![endif]-->
<!--[if IE 9 ]> <body class="ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <body> <!--<![endif]-->
http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
Thursday 2 December 2010
11. -webkit-line-clamp
<p style="
overflow : hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
">
WebKit Browsers will clamp the number of lines
in this paragraph to 2. Lorem ipsum dolor sit amet,
consectetur adipisicing elit, sed do eiusmod tempor
</p>
http://dropshado.ws/post/1015351370/webkit-line-clamp
Thursday 2 December 2010