You may have a great user interface, good content and an excellent idea to share with the world – but it will all be for nothing if your users leave your website because of slow load times. This is even more true for people accessing your website through a mobile device.
If you wish to retain your visitors, you have to think optimization. Period.
This talk will be mainly about reducing page load times, with a focus on mobile devices. We'll look at CSS and Javascript optimization, and touch a bit on image optimization. We'll check out some of the tools that Drupal provides for testing and improving performance, and we'll write some code of course.
17. Use SMACSS or similar principles
chop chop chop chop...
18. Don't slow down your selectors
two more divs
and I'm home...
body div#content .content > div > div> ul.menu li[class~="item"] ul li
19. CSS Selectors speed
I. ID ( #top )
II. Class ( .container )
III. Node/Element Type ( div )
IV. Sibling ( p + img )
V. Child ( ul > li )
VI. Descendant ( p strong )
VII. Universal ( * )
VIII. By Attribute ( [type="text"] )
IX. Pseudo Elements/Classes ( a:hover )
20. I. ID ( #top )
II. Class ( .container )
III. Node/Element Type ( div )
IV. Sibling ( p + img )
V. Child ( ul > li )
VI. Descendant ( p strong )
VII. Universal ( * )
VIII. By Attribute ( [type="text"] )
IX. Pseudo Elements/Classes ( a:hover )
29. Optimize your images
before uploading
http://www.smashingmagazine.com/2009/07/01/clever-jpeg-optimization-
techniques/
http://sixrevisions.com/tools/8-excellent-tools-for-optimizing-your-images/
http://www.imageoptimizer.net/Pages/Home.aspx
40. Simular projects
1) Responsive Images
- works as a field formatter
- only supports 2 sizes
2) Adaptive Image
- works with screen size, not window size
3) Adaptive Image Styles (ais)
- needs .htaccess rules
4) Client-side adaptive image
- works as a field formatter
5) Media: Responsive
- works only on media field
- set as maximum width
- uses css for the smaller variants