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.
42. Parallel Downloads
One domain = 2 Parallel connections
Thursday, 26 May 2011
43. 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
Thursday, 26 May 2011
44. 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
Thursday, 26 May 2011
45. Parallel Downloads
Too many hostnames can cause complications
Thursday, 26 May 2011
46. Parallel Downloads
Too many hostnames can cause complications
2 – 4 sub domains is a good average
Thursday, 26 May 2011
47. Combine Files
Combining 6 scripts into 1 eliminates 5 requests
Thursday, 26 May 2011
48. Combine Files
Combining 6 scripts into 1 eliminates 5 requests
Challenges:
develop as separate modules
combinations vs. loading more than needed
Thursday, 26 May 2011
49. Javascript
Doesn’t comply with
parallel download rules
Thursday, 26 May 2011
50. 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
Thursday, 26 May 2011
51. Javascript
script defer attribute is not a solution
Thursday, 26 May 2011
52. Javascript
script defer attribute is not a solution
Solution - move them as low in the
page as possible
Thursday, 26 May 2011