You’ve used all the server-side caching tricks in the book: memcache, APC, database cache and so on to squeeze every millisecond out, and now your site is as fast as it will ever get. Well guess again! These technologies are caching and creating the HTML which, if they done correctly, is only 10 – 20% of the user response time, so there is a lot of room for improvement. Learn how to optimize your JavaScript, CSS, Images, Cookies and a whole slew of other things that make frontend caching a magical place.
39. Parallel Downloads
One domain = 2 Parallel connections
Friday, 22 April 2011
40. Parallel Downloads
One domain = 2 Parallel connections
HTML
Image
Image
Image
Image
Image
Image
Image
Image
0.4 0.8 1.2 1.6 2 2.4 Secs
Friday, 22 April 2011
41. Parallel Downloads
Two domains = 4 Parallel connections
HTML
Image
Image
Image
Image
Image
Image
Image
Image
0.4 0.8 1.2 1.6 2 2.4 Secs
Friday, 22 April 2011
42. Parallel Downloads
Too many hostnames can cause complications
Friday, 22 April 2011
43. Parallel Downloads
Too many hostnames can cause complications
2 – 4 sub domains is a good average
Friday, 22 April 2011
44. Combine Files
Combining 6 scripts into 1 eliminates 5 requests
Friday, 22 April 2011
45. Combine Files
Combining 6 scripts into 1 eliminates 5 requests
Challenges:
develop as separate modules
combinations vs. loading more than needed
Friday, 22 April 2011
46. Javascript
Doesn’t comply with
parallel download rules
Friday, 22 April 2011
47. Javascript
Doesn’t comply with
parallel download rules
HTML
JS
Image
Image
Image
Image
Image
Image
Image
0.4 0.8 1.2 1.6 2 2.4 Secs
Friday, 22 April 2011
48. Javascript
script defer attribute is not a solution
Friday, 22 April 2011
49. Javascript
script defer attribute is not a solution
Solution - move them as low in the
page as possible
Friday, 22 April 2011
77. Resource Packages
JAR file that contains everything
Friday, 22 April 2011
78. Resource Packages
JAR file that contains everything
Compresses
Friday, 22 April 2011
79. Resource Packages
JAR file that contains everything
Compresses
Accesses individual resources
Friday, 22 April 2011
80. Resource Packages
JAR file that contains everything
Compresses
Accesses individual resources
Easy to maintain
Friday, 22 April 2011
81. Resource Packages
JAR file that contains everything
Compresses
Accesses individual resources
Easy to maintain
New Proposal in the works
Friday, 22 April 2011
82. Images
Badly optimised
Thumbnails
PNGs compressed up to 50%
Friday, 22 April 2011