SlideShare a Scribd company logo
Front-End Web
Performance Optimization
BucketSoft.com
Why performance matters
• Google found that the page with 10 results took 0.4 seconds to
generate. The page with 30 results took 0.9 seconds. Half a
second delay caused a 20% drop in traffic.
• Every 100 milliseconds in page load delay costs Amazon.com
1% of sales.
• By speeding the page load times up by 5 seconds, Shopzilla.com
increased their conversion rate by 7-12%.
wposample1.bucketsoft.com
Set Cache-Control: max-age
• By setting the max-age parameter for static content (CSS, JS,
and images) you effectively tell the browser to cache those files
for that amount of time.
• Eliminating all of those 304 Not Modified responses makes a big
difference for return visitors.
• The recommended max-age setting is 1 year. But max-age is in
seconds, so that's 60 x 60 x 24 x 365 = 31536000.
• If your CSS file changes, for example, you should change the file
name or append a querystring, e.g. href="/screen.css?v=2"
Waterfall view from webpagetest.org
Unoptimized
Dulles, VA

Amsterdam, NL

START RENDER

START RENDER

1.333s

1.623s

LOAD TIME

LOAD TIME

2.080s

2.545s
GZIP Compression
• Has been around since IE4 days.
• Can compress HTML, JS, and CSS files to about 1/3 or 1/4 their
original size.
• We might have opted to not do dynamic compression in the
past on older servers. But processing speeds today are much
higher.
• Bottom line: Always enable GZIP on your server.
GZIP Compression
Dulles, VA

Amsterdam, NL

START RENDER

START RENDER

1.121s 15.9% faster

1.411s 13.1% faster

LOAD TIME

LOAD TIME

1.880s 9.6% faster

2.466s 3.1% faster
Move JS to bottom of HTML
• JavaScript exhibits a blocking behavior in the browser as it's
being downloaded and parsed.
• Moving JavaScript references to the bottom of the HTML just
before the </body> tag will allow the page to start rendering
sooner.
Move JS to bottom of HTML
Dulles, VA

Amsterdam, NL

START RENDER

START RENDER

0.457s 59.2% faster

0.855s 39.4% faster

LOAD TIME

LOAD TIME

1.766s 6.1% faster

2.244s 9.0% faster
Combine files / CSS sprites
• There is latency and overhead in every request, so you should limit the number of requests.
• Here's an example of a single request to Google...
• GET http://www.google.com/ HTTP/1.1 Accept: application/x-ms-application, image/jpeg,
application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel,
application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, / AcceptLanguage: en-US User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64;
Trident/4.0; GTB0.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media
Center PC 6.0; OfficeLiveConnector.1.4; OfficeLivePatch.1.3) Accept-Encoding: gzip, deflate
Connection: Keep-Alive Host: www.google.com Cookie:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Combine files / CSS sprites
Combine files / CSS sprites
Dulles, VA

Amsterdam, NL

START RENDER

START RENDER

0.440s 3.7% faster

0.818s 4.3% faster

LOAD TIME

LOAD TIME

1.575s 10.8% faster

2.182s 2.7% faster
Minify CSS and JS
• Minification strips out unnecessary whitespace and comments.
• While GZIP does a good job in compressing text, minification
has some language-specific optimizations that GZIP alone can't
give you.
• Bottom line: Use both minification and GZIP.
Minify CSS and JS
Dulles, VA

Amsterdam, NL

START RENDER

START RENDER

0.352s 20.0% faster

0.665s 18.7% faster

LOAD TIME

LOAD TIME

1.554s 1.3% faster

2.030s 7.0% faster
CDN
• A CDN (Content Delivery Network) solves the problem of global
latency.
• A CDN is worth using whenever you have a global audience.
CDN
Dulles, VA

Amsterdam, NL

START RENDER

START RENDER

0.417s 18.5% slower

0.620s 6.8% faster

LOAD TIME

LOAD TIME

1.592s 2.4% slower

1.835s 9.6% faster
Overall improvement
Dulles, VA

Amsterdam, NL

START RENDER

START RENDER

68.7% faster overall

61.8% faster overall

LOAD TIME

LOAD TIME

23.5% faster overall

27.9% faster overall
Recommended Reading
• My Favorite WPO Tools and Services
http://www.bucketsoft.com/articles/favorite-websiteoptimization-tools-and-services
• Performance is a Feature
http://www.codinghorror.com/blog/2011/06/performance-is-afeature.html

More Related Content

PPTX
Front end optimization
PPTX
Squeeze Maximum Performance From Your Joomla Website
PDF
How i acheived a pretty good google page speed insights score
PDF
UXify 2015 - Front-end Developers' Checklist for Better UX
PPTX
Speed up Your Joomla Site for Ultimate Performance
PDF
Cache is keeping you from reaching the full potential as a developer (word ca...
PPTX
Caching 101
PPTX
Show Me The Cache!
Front end optimization
Squeeze Maximum Performance From Your Joomla Website
How i acheived a pretty good google page speed insights score
UXify 2015 - Front-end Developers' Checklist for Better UX
Speed up Your Joomla Site for Ultimate Performance
Cache is keeping you from reaching the full potential as a developer (word ca...
Caching 101
Show Me The Cache!

What's hot (20)

PPTX
Why your slow loading website is costing you sales and how to fix it
PPTX
Why your slow loading website is costing you sales and how to fix it
PPTX
How to make your site 5 times faster in 10 minutes
PDF
STATAMIC
PDF
How to Speed Up Your Joomla Website
PPTX
Automated Testing with Google Chrome - WebDriver- ChromeDriver
PPTX
Wordcamp2009
PDF
Open-source website performance tools
PPTX
Life in the Fast Lane: Speed, Usability & Search Engine Optimization
PDF
Introduction to WordPress Security
PPTX
PPTX
Performance Metrics in a Day with Selenium
PPTX
WordPress Performance 101
PPTX
Drupal Caching For Dummies
PPTX
Caching WordPress - Anthony Burchell Wordcamp Presentation
PPT
Os Souders
PPTX
Optimizing your WordPress website
PPTX
Minimize website page loading time – 20+ advanced SEO tips
PDF
Web performance testing with web driver
PPTX
How webpage loading takes place?
Why your slow loading website is costing you sales and how to fix it
Why your slow loading website is costing you sales and how to fix it
How to make your site 5 times faster in 10 minutes
STATAMIC
How to Speed Up Your Joomla Website
Automated Testing with Google Chrome - WebDriver- ChromeDriver
Wordcamp2009
Open-source website performance tools
Life in the Fast Lane: Speed, Usability & Search Engine Optimization
Introduction to WordPress Security
Performance Metrics in a Day with Selenium
WordPress Performance 101
Drupal Caching For Dummies
Caching WordPress - Anthony Burchell Wordcamp Presentation
Os Souders
Optimizing your WordPress website
Minimize website page loading time – 20+ advanced SEO tips
Web performance testing with web driver
How webpage loading takes place?
Ad

Similar to Front-End Web Performance Optimization by BucketSoft (20)

PPTX
The Need for Speed - SMX Sydney 2013
PPTX
SearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital Marketers
KEY
Page Performance
PDF
The Need for Speed (5 Performance Optimization Tipps) - brightonSEO 2014
PPTX
Analysis of Google Page Speed Insight
PDF
Website Performance at Client Level
PDF
Web performance optimization - MercadoLibre
PDF
A little journey into website optimization
PDF
Web performance mercadolibre - ECI 2013
PPTX
10 Tips to make your Website lightning-fast - SMX Stockholm 2012
PDF
Optimising Web Application Frontend
PPTX
Building Faster Websites
PDF
High performance website
PPTX
Website Performance
PPT
Web performance Talk
KEY
Faster Frontends
PPTX
High Performance Websites
PPTX
Web Performance 101
PPT
Oracle UCM: Web Site Performance Tuning
PPT
performance.ppt
The Need for Speed - SMX Sydney 2013
SearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital Marketers
Page Performance
The Need for Speed (5 Performance Optimization Tipps) - brightonSEO 2014
Analysis of Google Page Speed Insight
Website Performance at Client Level
Web performance optimization - MercadoLibre
A little journey into website optimization
Web performance mercadolibre - ECI 2013
10 Tips to make your Website lightning-fast - SMX Stockholm 2012
Optimising Web Application Frontend
Building Faster Websites
High performance website
Website Performance
Web performance Talk
Faster Frontends
High Performance Websites
Web Performance 101
Oracle UCM: Web Site Performance Tuning
performance.ppt
Ad

Recently uploaded (20)

PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Big Data Technologies - Introduction.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Spectroscopy.pptx food analysis technology
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Approach and Philosophy of On baking technology
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Network Security Unit 5.pdf for BCA BBA.
Review of recent advances in non-invasive hemoglobin estimation
Chapter 3 Spatial Domain Image Processing.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Big Data Technologies - Introduction.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Reach Out and Touch Someone: Haptics and Empathic Computing
The AUB Centre for AI in Media Proposal.docx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Spectroscopy.pptx food analysis technology
Diabetes mellitus diagnosis method based random forest with bat algorithm
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Electronic commerce courselecture one. Pdf
MIND Revenue Release Quarter 2 2025 Press Release
Approach and Philosophy of On baking technology

Front-End Web Performance Optimization by BucketSoft

  • 2. Why performance matters • Google found that the page with 10 results took 0.4 seconds to generate. The page with 30 results took 0.9 seconds. Half a second delay caused a 20% drop in traffic. • Every 100 milliseconds in page load delay costs Amazon.com 1% of sales. • By speeding the page load times up by 5 seconds, Shopzilla.com increased their conversion rate by 7-12%.
  • 4. Set Cache-Control: max-age • By setting the max-age parameter for static content (CSS, JS, and images) you effectively tell the browser to cache those files for that amount of time. • Eliminating all of those 304 Not Modified responses makes a big difference for return visitors. • The recommended max-age setting is 1 year. But max-age is in seconds, so that's 60 x 60 x 24 x 365 = 31536000. • If your CSS file changes, for example, you should change the file name or append a querystring, e.g. href="/screen.css?v=2"
  • 5. Waterfall view from webpagetest.org
  • 6. Unoptimized Dulles, VA Amsterdam, NL START RENDER START RENDER 1.333s 1.623s LOAD TIME LOAD TIME 2.080s 2.545s
  • 7. GZIP Compression • Has been around since IE4 days. • Can compress HTML, JS, and CSS files to about 1/3 or 1/4 their original size. • We might have opted to not do dynamic compression in the past on older servers. But processing speeds today are much higher. • Bottom line: Always enable GZIP on your server.
  • 8. GZIP Compression Dulles, VA Amsterdam, NL START RENDER START RENDER 1.121s 15.9% faster 1.411s 13.1% faster LOAD TIME LOAD TIME 1.880s 9.6% faster 2.466s 3.1% faster
  • 9. Move JS to bottom of HTML • JavaScript exhibits a blocking behavior in the browser as it's being downloaded and parsed. • Moving JavaScript references to the bottom of the HTML just before the </body> tag will allow the page to start rendering sooner.
  • 10. Move JS to bottom of HTML Dulles, VA Amsterdam, NL START RENDER START RENDER 0.457s 59.2% faster 0.855s 39.4% faster LOAD TIME LOAD TIME 1.766s 6.1% faster 2.244s 9.0% faster
  • 11. Combine files / CSS sprites • There is latency and overhead in every request, so you should limit the number of requests. • Here's an example of a single request to Google... • GET http://www.google.com/ HTTP/1.1 Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, / AcceptLanguage: en-US User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; GTB0.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; OfficeLiveConnector.1.4; OfficeLivePatch.1.3) Accept-Encoding: gzip, deflate Connection: Keep-Alive Host: www.google.com Cookie: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  • 12. Combine files / CSS sprites
  • 13. Combine files / CSS sprites Dulles, VA Amsterdam, NL START RENDER START RENDER 0.440s 3.7% faster 0.818s 4.3% faster LOAD TIME LOAD TIME 1.575s 10.8% faster 2.182s 2.7% faster
  • 14. Minify CSS and JS • Minification strips out unnecessary whitespace and comments. • While GZIP does a good job in compressing text, minification has some language-specific optimizations that GZIP alone can't give you. • Bottom line: Use both minification and GZIP.
  • 15. Minify CSS and JS Dulles, VA Amsterdam, NL START RENDER START RENDER 0.352s 20.0% faster 0.665s 18.7% faster LOAD TIME LOAD TIME 1.554s 1.3% faster 2.030s 7.0% faster
  • 16. CDN • A CDN (Content Delivery Network) solves the problem of global latency. • A CDN is worth using whenever you have a global audience.
  • 17. CDN Dulles, VA Amsterdam, NL START RENDER START RENDER 0.417s 18.5% slower 0.620s 6.8% faster LOAD TIME LOAD TIME 1.592s 2.4% slower 1.835s 9.6% faster
  • 18. Overall improvement Dulles, VA Amsterdam, NL START RENDER START RENDER 68.7% faster overall 61.8% faster overall LOAD TIME LOAD TIME 23.5% faster overall 27.9% faster overall
  • 19. Recommended Reading • My Favorite WPO Tools and Services http://www.bucketsoft.com/articles/favorite-websiteoptimization-tools-and-services • Performance is a Feature http://www.codinghorror.com/blog/2011/06/performance-is-afeature.html