SlideShare a Scribd company logo
Speed Loading Tactics for a quicker initial page load
What to do First Concatenate Remove Fluff GZip Cache  Sprite
Concatenation Multiple JavaScript files == slow   Script blocking   Overhead for each request    Image loading is delayed       Tools   JSBuilder   Also Removes Fluff  
Script Blocking Each script waits for the previous
HTTP Negotiation combined file contents 2.26s negotiation 0.37s  combined negotiation 2.37s  file contents 1.1s
Using JSBuilder Demo time!
GZip Compression Can you say Kick Ass!
Reasons to use GZip    60% smaller files Server compresses on the fly Browser decompresses       Notes  Works for css as well  Don't use on compressed content (jpg, gif, png, etc)
GZip Results Reduced download time by 45%
Enabling GZip   Load Apache2 Module in httpd.conf   LoadModule deflate_module modules/mod_deflate.so   .htaccess or httpd.conf   <IfModule mod_deflate.c>   SetOutputFilter DEFLATE   AddOutputFilterByType DEFLATE text/html text/plain text/css text/javascript application/javascript application/x-javascript </IfModule>       Note: Uses 'gzip' routine, not MS 'deflate' routine
Caching Set Cache-Control headers  Sends expiration date in response Browser reads expiration date
Cache Content Cached files not downloaded on re-visit
Enabling Cache/Expire Load Apache2 Module in httpd.conf   LoadModule expires_module modules/mod_expires.so LoadModule headers_module modules/mod_headers.so   .htaccess or httpd.conf   <IfModule mod_expires.c> ExpiresActive On ExpiresByType text/css &quot;access plus 30 days&quot; ExpiresByType text/javascript &quot;access plus 7 days&quot; ExpiresByType application/x-javascript &quot;access plus 7 days&quot; ExpiresByType application/javascript &quot;access plus 7 days&quot; ExpiresByType image/x-icon &quot;access plus 7 days&quot; ExpiresByType image/vnd.microsoft.icon &quot;access plus 7 days&quot; ExpiresByType image/png &quot;access plus 30 days&quot; ExpiresByType image/gif &quot;access plus 30 days&quot; ExpiresByType image/jpeg &quot;access plus 30 days&quot; ExpiresByType image/jpg &quot;access plus 30 days&quot; ExpiresByType application/x-shockwave-flash &quot;access plus 30 days&quot; </IfModule>
Bust The Cache Update the users files   Version numbers embedded in file name   YourCoolJavaScript. 2.2 .js  becomes  YourCoolJavaScript. 2.3 .js    Version number as query string YourCoolJavaScript.js?ver= 2.2   becomes  YourCoolJavaScript.js?ver= 2.3
Sprites Combine multiple images into one Use CSS to display image by coordinates
Sprite Sample Single Image (Sprite) - 2.5k   Multiple Images - 6.1k total
Sprite Results 60% faster
General Notes CSS Always goes in the head Other locations will delay page rendering GZip can actually be slower on old server/client hardware
Tools JSBuilder http://code.google.com/p/js-builder/   IBM Page Detailer http://www.alphaworks.ibm.com/tech/pagedetailer Live HTTP Headers http://livehttpheaders.mozdev.org/installation.html

More Related Content

PPT
Speed Up Your Website
PDF
Building your own personal minion with grunt.js
PDF
How to speed up your website
PDF
Modernizing Your WordPress Workflow with Grunt & Bower
PPTX
Avatar Maven
PDF
Simple tricks to improve the performance of your site
PDF
Profiling PHP with Xdebug / Webgrind
PPT
Bigger Stronger Faster
Speed Up Your Website
Building your own personal minion with grunt.js
How to speed up your website
Modernizing Your WordPress Workflow with Grunt & Bower
Avatar Maven
Simple tricks to improve the performance of your site
Profiling PHP with Xdebug / Webgrind
Bigger Stronger Faster

What's hot (20)

PDF
ServiceWorker: New game changer is coming!
PDF
Preprocessor Workflow with Grunt
PPTX
Grunt understanding
PDF
Introduction to Express and Grunt
PDF
Puppeteer - Headless Chrome Node API
PDF
Polyglot Gradle with Node.js and Play
KEY
WebGL Awesomeness
PDF
Javascript fullstasck
PPTX
Learning gutenberg css tricks
PDF
Production Ready Javascript With Grunt
PDF
Automate your WordPress Workflow with Grunt.js
PPTX
Drive chrome(headless) with puppeteer
PDF
Intro to AngularJS
PPTX
Grunt - The JavaScript Task Runner
PPTX
GulpGruntNPM
PPTX
NPM, Bower and Gulp Kickstart in Visual Studio
PDF
Grunt js and WordPress
PPT
Silicon Valley CodeCamp 2008: High performance Ajax with ExtJS and ASP.NET
ODP
What grunt?
ServiceWorker: New game changer is coming!
Preprocessor Workflow with Grunt
Grunt understanding
Introduction to Express and Grunt
Puppeteer - Headless Chrome Node API
Polyglot Gradle with Node.js and Play
WebGL Awesomeness
Javascript fullstasck
Learning gutenberg css tricks
Production Ready Javascript With Grunt
Automate your WordPress Workflow with Grunt.js
Drive chrome(headless) with puppeteer
Intro to AngularJS
Grunt - The JavaScript Task Runner
GulpGruntNPM
NPM, Bower and Gulp Kickstart in Visual Studio
Grunt js and WordPress
Silicon Valley CodeCamp 2008: High performance Ajax with ExtJS and ASP.NET
What grunt?
Ad

Viewers also liked (9)

PPT
Farmers Market
PPT
Ujredi
PDF
Simya Yayinlari Matematik 2 Soru Bankasi
PPT
Getting Started with jQuery
PPT
Sencha Touch Intro
PDF
PARALEL KENAR
PPTX
Get On The Reference Bus! Wyoming
PPTX
7 Sales Megatrends: #StayRelevant in the #NewNormal
PPTX
Get On The Bus! Wyoming
Farmers Market
Ujredi
Simya Yayinlari Matematik 2 Soru Bankasi
Getting Started with jQuery
Sencha Touch Intro
PARALEL KENAR
Get On The Reference Bus! Wyoming
7 Sales Megatrends: #StayRelevant in the #NewNormal
Get On The Bus! Wyoming
Ad

Similar to Speed Loading (20)

PPTX
The Need for Speed - SMX Sydney 2013
PPTX
PageSpeed Optimization
ODP
Caching for Cash, part 4 DPC 2009
PPT
Csdn Drdobbs Tenni Theurer Yahoo
PPT
Performance engineering
PDF
Optimizing Your Frontend Performance
ODP
Caching for Cash - Part 4
PDF
High Performance Ajax Applications
PPTX
Optimizing Client-Side Performance
PPT
PPT
腾讯大讲堂09 如何建设高性能网站
PPT
腾讯大讲堂09 如何建设高性能网站
PDF
Website optimization
PPTX
Harder, Better, Faster, Stronger
PPTX
10 Tips to make your Website lightning-fast - SMX Stockholm 2012
PPT
The Need For Speed
PPT
performance.ppt
PPTX
High Performance Websites
PPT
High Performance Websites By Souders Steve
PPT
High Performance Web Sites
The Need for Speed - SMX Sydney 2013
PageSpeed Optimization
Caching for Cash, part 4 DPC 2009
Csdn Drdobbs Tenni Theurer Yahoo
Performance engineering
Optimizing Your Frontend Performance
Caching for Cash - Part 4
High Performance Ajax Applications
Optimizing Client-Side Performance
腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站
Website optimization
Harder, Better, Faster, Stronger
10 Tips to make your Website lightning-fast - SMX Stockholm 2012
The Need For Speed
performance.ppt
High Performance Websites
High Performance Websites By Souders Steve
High Performance Web Sites

Recently uploaded (20)

PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Big Data Technologies - Introduction.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Empathic Computing: Creating Shared Understanding
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Spectroscopy.pptx food analysis technology
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Programs and apps: productivity, graphics, security and other tools
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
NewMind AI Weekly Chronicles - August'25 Week I
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Spectral efficient network and resource selection model in 5G networks
Network Security Unit 5.pdf for BCA BBA.
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Encapsulation_ Review paper, used for researhc scholars
Big Data Technologies - Introduction.pptx
The AUB Centre for AI in Media Proposal.docx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Unlocking AI with Model Context Protocol (MCP)
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Empathic Computing: Creating Shared Understanding
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Spectroscopy.pptx food analysis technology
“AI and Expert System Decision Support & Business Intelligence Systems”
MIND Revenue Release Quarter 2 2025 Press Release
Programs and apps: productivity, graphics, security and other tools

Speed Loading

  • 1. Speed Loading Tactics for a quicker initial page load
  • 2. What to do First Concatenate Remove Fluff GZip Cache Sprite
  • 3. Concatenation Multiple JavaScript files == slow   Script blocking   Overhead for each request    Image loading is delayed      Tools   JSBuilder   Also Removes Fluff  
  • 4. Script Blocking Each script waits for the previous
  • 5. HTTP Negotiation combined file contents 2.26s negotiation 0.37s combined negotiation 2.37s file contents 1.1s
  • 7. GZip Compression Can you say Kick Ass!
  • 8. Reasons to use GZip   60% smaller files Server compresses on the fly Browser decompresses       Notes Works for css as well Don't use on compressed content (jpg, gif, png, etc)
  • 9. GZip Results Reduced download time by 45%
  • 10. Enabling GZip   Load Apache2 Module in httpd.conf   LoadModule deflate_module modules/mod_deflate.so   .htaccess or httpd.conf   <IfModule mod_deflate.c>   SetOutputFilter DEFLATE   AddOutputFilterByType DEFLATE text/html text/plain text/css text/javascript application/javascript application/x-javascript </IfModule>       Note: Uses 'gzip' routine, not MS 'deflate' routine
  • 11. Caching Set Cache-Control headers Sends expiration date in response Browser reads expiration date
  • 12. Cache Content Cached files not downloaded on re-visit
  • 13. Enabling Cache/Expire Load Apache2 Module in httpd.conf   LoadModule expires_module modules/mod_expires.so LoadModule headers_module modules/mod_headers.so   .htaccess or httpd.conf   <IfModule mod_expires.c> ExpiresActive On ExpiresByType text/css &quot;access plus 30 days&quot; ExpiresByType text/javascript &quot;access plus 7 days&quot; ExpiresByType application/x-javascript &quot;access plus 7 days&quot; ExpiresByType application/javascript &quot;access plus 7 days&quot; ExpiresByType image/x-icon &quot;access plus 7 days&quot; ExpiresByType image/vnd.microsoft.icon &quot;access plus 7 days&quot; ExpiresByType image/png &quot;access plus 30 days&quot; ExpiresByType image/gif &quot;access plus 30 days&quot; ExpiresByType image/jpeg &quot;access plus 30 days&quot; ExpiresByType image/jpg &quot;access plus 30 days&quot; ExpiresByType application/x-shockwave-flash &quot;access plus 30 days&quot; </IfModule>
  • 14. Bust The Cache Update the users files   Version numbers embedded in file name   YourCoolJavaScript. 2.2 .js becomes YourCoolJavaScript. 2.3 .js   Version number as query string YourCoolJavaScript.js?ver= 2.2 becomes YourCoolJavaScript.js?ver= 2.3
  • 15. Sprites Combine multiple images into one Use CSS to display image by coordinates
  • 16. Sprite Sample Single Image (Sprite) - 2.5k   Multiple Images - 6.1k total
  • 18. General Notes CSS Always goes in the head Other locations will delay page rendering GZip can actually be slower on old server/client hardware
  • 19. Tools JSBuilder http://code.google.com/p/js-builder/   IBM Page Detailer http://www.alphaworks.ibm.com/tech/pagedetailer Live HTTP Headers http://livehttpheaders.mozdev.org/installation.html

Editor's Notes

  • #2: tonight im going to cover some ways to get your pages to load faster. specifically, pages with a larege amount of javascript and css like the ones we build when creating highly interactive web sites or web appiications.
  • #3: I would imagene you have heard of many if not all of these things before. They are commonly used for the kind of javascript development we to do nowadays. What im seeing however, is that few people actually implement them.
  • #4: The single greatest speed savings lies in concatenating your javascript and css files. when we have multiple javascript files, the browser does something called script blocking, which is where it forces each javascript file to be completely downloaded before the next is started.  each request also carries with it the overhead of header information used for the http request. we can elimnate this as well by concatenation our javascript and css. There is a tool out there called JSBuilder that lets us do this, which we will cover in a a moment, but first lets look at script blocking and why it sucks so much.