SlideShare une entreprise Scribd logo
1  sur  33
Web Performance Optimization (WPO)
General, Server Side and Technology level Techniques
Outline
General Level Optimization
1
2
Importance of Web Performance
Server Side Optimization3
Technology Level Optimization4
Performance Measurement Sites5
References6
Importance of Web Performance
 Even a few seconds delay is enough to create an unpleasant user experience.
 57% of online shoppers will wait 3 seconds or less before abandoning the site.
 Google engineers found that users begin to get frustrated with a site after waiting just
400 milliseconds – literally the blink of an eye – for web pages to load.
Source – Aberdeen Group
Levels of Optimization
General
Level
• Content
• Cookie
• CSS
• JavaScript
• Image
• Mobile
Server
Level
Technology
Level
Levels of Optimization
General Level Optimization
1. Minimize HTTP Requests
 Most of the time is tied up in downloading all the components in the page:
images, stylesheets, scripts, Flash, etc.
 How to minimize HTTP Request?
 Combined files are a way to reduce the number of HTTP requests by
combining all scripts and CSS into a single stylesheet and CSS respectively.
 CSS Sprites are the preferred method for reducing the number of image
requests.
 Image maps combines multiple images to single image.
 Browser Cache Usage - 40-60% of daily visitors to your site come in with an
empty cache.
2. Put Stylesheets at the Top
 Various research shows that moving stylesheets to the document HEAD makes pages
appear to be loading faster.
 The problem with putting stylesheets at the bottom of the document is that it
prohibits progressive rendering and user’s stuck viewing a blank white page.
 Placing stylesheets in the HEAD allows the page to render progressively.
 Vital for pages with a lot of content and for users on slower Internet connections.
General Level Optimization
3. Minify JavaScript and CSS
 Minification reduces response time and the size.
 Few popular tools for minifying are:
 JSMin
 YUI Compressor
 Google Closure Compiler
 Obfuscation is an alternative optimization.
 Both methods achieves fairly the same size reduction (Minification achieved a 21%
size reduction, where 25% for obfuscation), but obfuscation is bit risky with JavaScript.
 Should minified in-line JS and CSS as well (5% reduction).
General Level Optimization
4. Avoid CSS Expressions
 CSS expressions are a powerful (and dangerous) way to set CSS properties
dynamically.
 Supported in IE starting with version 5, but were deprecated starting with IE8.
 Adding a counter to the CSS expression allows us to keep track of when and how
often a CSS expression is evaluated.
 Solutions
 Use one time expression instead of CSS expression.
 For Dynamic throughout style property, use Event handler.
background-color: expression( (new Date()).getHours()%2 ? "#B8D4FF" : "#F08A00" );
General Level Optimization
5. Make JavaScript and CSS External
 Using external files produces faster pages.
 JS and CSS files are cached.
 In-lined increases the document’s size.
 Many documents could re-use them.
 To reduce HTTP requests in the front page:
 In-line JavaScript and CSS, but dynamically download the external files after
finished loading.
General Level Optimization
6. Choose <link> over @import
 The difference between them is that @import is the CSS mechanism to include a
style sheet and <link> the HTML mechanism. However, browsers handle them
differently, giving <link> a clear advantage in terms of performance.
 In IE @import behaves the same as using <link> at the bottom of the page, so it's
best not to use it.
General Level Optimization
7. Put Scripts at Bottom
 Browser do not download more than two components in parallel per hostname.
 Block parallel downloads across all hostnames.
 Block rendering of everything below them in the page.
 Never uses document.write.
General Level Optimization
8. Remove Duplicate Scripts
 Two of Ten top sites contains duplicated script.
 Main factors increase the odds of a script being duplicated in a single web page is
team size and number of scripts.
 Hurt performance by creating unnecessary HTTP requests and wasted JavaScript
execution.
 Solutions
 Implement a script management module in your template system.
 The typical way to include a script is to use the SCRIPT tag in your HTML page.
 An alternative in PHP would be to create a function called InsertScript.
<script type="text/javascript" src="menu_1.0.17.js"></script>
<?php insertScript("menu.js") ?>
General Level Optimization
9. Optimize Image
 Image needs to be optimized before you FTP those images to your web server, after
designer is done with creating the images for your web page.
 Key things are
 Check the GIFs, whether palette size corresponding to the number of colors in
the image.
 Try converting GIFs to PNGs (except for animations).
 Run pngcrush (or any other PNG optimizer tool) on all your PNGs.
 Run jpegtran on all your JPEGs.
General Level Optimization
10. Optimize CSS Sprites
 Arranging the images horizontally (makes the smaller file size).
 Combining similar colors in a sprite helps you keep the color count low, ideally under
256 colors so to fit in a PNG8.
 Don’t leave big gaps between the images in a sprite.
 It makes the user agent requires less memory.
General Level Optimization
11. Keep Components Under 25kb for Mobile Site
 iPhone wont cache components > 25K (uncompressed size).
 Minification is important because gzip alone may not be sufficient.
12. Don’t Scale Images in HTML
 Do not use a bigger image than you need.
 If you need
<img width="100" height="100" src="mycat.jpg" alt="My Cat" />
then mycat.jpg should be 100x100px, rather than scale down from 500x500px image
General Level Optimization
13. Make favicon.ico Small and Cacheable
 Browser will always request it, better not to respond 404.
• Cookies are sent every time its requested.
• Also interferes with the download sequence in IE.
 Solutions
 Make it small, preferably under 1K.
 Set Expires header when you feel comfortable.
 Imagemagick can help you create small favicons.
General Level Optimization
14. Avoid Empty Image src
 Image with empty string src attribute occurs more than one will expect.
 It appears in two form: –
 Straight HTML  <img src=" ">
 JavaScript  var img = new Image();
img.src = "";
 Browser makes another request to your server.
 Cripple your servers by sending a large amount of unexpected traffic.
 Waste server computing cycles.
 Possibly corrupt user data.
 HTML5 instruct browsers not to make an additional request.
 Empty image src can destroy your site.
General Level Optimization
15. Avoid Redirects
 Redirects are accomplished using the 301 and 302 status codes.
 Redirects slow down the user experience.
 Nothing can be rendered
 Round-trip request
 Add Expires headers to cache redirects.
 Wasteful Redirect, i.e. when a trailing slash (/) is missing from a URL that should
otherwise have one.
 This is fixed in Apache by using Alias or mod_rewrite, or the DirectorySlash directive
if you're using Apache handlers.
HTTP/1.1 301 Moved Permanently
Location: http://example.com/newuri
Content-Type: text/html
General Level Optimization
16. Make Ajax Cacheable
 Expires or Cache-Control header.
 Adding a timestamp to the URL – &t=1190241612.
 When it has been modified, send with a new timestamp.
 The most important way to improve the performance of Ajax is to make the
responses cacheable
17. Avoid 404’s
 Ineffectual response (i.e. 404 Not Found) is totally unnecessary and will slow down
the user experience without any benefit.
General Level Optimization
18. Reduce Cookie Size
 HTTP cookies are used for a variety of reasons such as authentication and
personalization.
 It's important to keep the size of cookies as low as possible to minimize the impact
on the user's response time.
 Eliminate unnecessary cookies.
 Keep cookie sizes small.
 Setting cookies at the appropriate domain level.
 Set an Expires date appropriately. An earlier Expires date or none removes the cookie
sooner, improving the user response time
General Level Optimization
Levels of Optimization
1. Implement Content Delivery Network (CDN)
 The users proximity has an impact on response times.
 Solutions
 Use a CDN: Akamai Technologies, EdgeCast, Amazon CloudFront, or level3.
 Distribute your static content before distributing your dynamic content.
 At Yahoo, using a CDN improved response times >= 20%.
Server Level Optimization
2. Reduce DNS Lookups
 Domain Name System (DNS) maps hostnames to IP addresses.
 On average, takes 20-120 Milliseconds.
 IE caches :
DnsCacheTimeout : 30 minutes
 Firefox :
network.dnsCacheExpiration : 1 minute
(Fasterfox changes this to 1 hour)
 Reducing hostnames reduces the DNS lookups, But it reduces parallel downloads.
 Better to split these components across at least two but no more than four
hostnames.
Server Level Optimization
3. Split Components Across Domains
 Splitting components allows you to maximize parallel downloads.
 Make sure you're using not more than 2-4 domains because of the DNS lookup
penalty.
 For Instance, you can host your HTML and dynamic content on www.example.org
and split static components between static1.example.org and static2.example.org.
Server Level Optimization
4. Use Cookie-free Domains for Components
 Create www site and sub-domain.
 that sub-domain is cookie-free.
 Buy a whole new domain if already set on domain without www.
 Yahoo! uses yimg.com,
 YouTube uses ytimg.com,
 Amazon uses images-amazon.com and so on.
 Some proxies might refuse to cache the components that are requested with
cookies.
Server Level Optimization
5. Add Expires or Cache-Control Header
 Use "Never expire" policy for static components by setting far future Expires
header.
 For dynamic components, use an appropriate Cache-Control header to help the
browser with conditional requests.
 Avoid unnecessary HTTP requests on subsequent page view after the first visit.
Server Level Optimization
6. Gzip Components
 Gzip is effective compression method compared to deflate.
 Key Features are
 Reduces response times.
 The response size ~ 70% reduction.
 90%+ of browsers support gzip.
 Compress any text responses.
 Image and PDF files SHOULD NOT be gzipped.
 In Apache, the module configuring gzip depends on your version: Apache 1.3 uses
mod_gzip while Apache 2.x uses mod_deflate.
Server Level Optimization
Levels of Optimization
General Guidelines
 Keep the Joomla! Version updated.
 Choose extensions wisely.
 Deactivate unused extensions, upgrade used.
 Simplify your templates as much as possible.
 Use Cache.
 Optimize the MYSQL Statements.
 Use limited number of Records in SQL.
Enhance Joomla! Web
1. Flush Buffer Early
 Normally, it may take 200 to 500ms for the backend server to stitch together the
HTML page, once a user request a page.
 The browser remains idle until data is received.
 In PHP flush() function allows you to send your partially ready HTML response to
the browser so that the browser can start fetching components while your backend
is busy with the rest of the HTML page.
 The benefit is mainly seen on busy backend or light frontend.
 Flushing after the HEAD is optimal, as it allows to include any JS and CSS.
 Example
Technology Level Optimization
... <!-- css, js -->
</head>
<?php flush(); ?>
<body>
... <!-- content -->
Performance Measurement Sites
 http://www.webpagetest.org/
 http://tools.pingdom.com/
 http://gtmetrix.com/
 http://www.websiteoptimization.com/services/analyze/
 http://site-perf.com/
 https://developers.google.com/speed/pagespeed/insights
 http://loadimpact.com/page-analyzer
 http://newrelic.com/
Performace optimization (increase website speed)

Contenu connexe

Tendances

Speed up your site! #wcmtl2015 by Meagan Hanes
Speed up your site! #wcmtl2015 by Meagan HanesSpeed up your site! #wcmtl2015 by Meagan Hanes
Speed up your site! #wcmtl2015 by Meagan HanesMeagan Hanes
 
Core Web Vitals Optimization for any website, especially WordPress
Core Web Vitals Optimization for any website, especially WordPressCore Web Vitals Optimization for any website, especially WordPress
Core Web Vitals Optimization for any website, especially WordPressClementYo
 
How to Fix a Slow WordPress Site (and get A+ scores)
How to Fix a Slow WordPress Site (and get A+ scores)How to Fix a Slow WordPress Site (and get A+ scores)
How to Fix a Slow WordPress Site (and get A+ scores)Lewis Ogden
 
Tips for optimizing WordPress performance and usability
Tips for optimizing WordPress performance and usabilityTips for optimizing WordPress performance and usability
Tips for optimizing WordPress performance and usabilityPuneet Sahalot
 
How webpage loading takes place?
How webpage loading takes place?How webpage loading takes place?
How webpage loading takes place?Abhishek Mitra
 
WPblog's Ultimate WordPress Guide to Boost Your Website Performance
WPblog's Ultimate WordPress Guide to Boost Your Website Performance WPblog's Ultimate WordPress Guide to Boost Your Website Performance
WPblog's Ultimate WordPress Guide to Boost Your Website Performance Jessica Ervin
 
Is your website's speed letting you down?
Is your website's speed letting you down?Is your website's speed letting you down?
Is your website's speed letting you down?Ray Krzeminski
 
Boosting your conversion rate through web performance improvements
Boosting your conversion rate through web performance improvementsBoosting your conversion rate through web performance improvements
Boosting your conversion rate through web performance improvementsAlyss Noland
 
Web Performance: 3 Stages to Success
Web Performance: 3 Stages to SuccessWeb Performance: 3 Stages to Success
Web Performance: 3 Stages to SuccessAustin Gil
 
Web performance optimization (WPO)
Web performance optimization (WPO)Web performance optimization (WPO)
Web performance optimization (WPO)Mariusz Kaczmarek
 
SearchLove San Diego 2018 | Tom Anthony | An Introduction to HTTP/2 & Service...
SearchLove San Diego 2018 | Tom Anthony | An Introduction to HTTP/2 & Service...SearchLove San Diego 2018 | Tom Anthony | An Introduction to HTTP/2 & Service...
SearchLove San Diego 2018 | Tom Anthony | An Introduction to HTTP/2 & Service...Distilled
 
Ctrl+F5 Bangalore 2017: Super charge you word press website by Justin Thomas
Ctrl+F5 Bangalore 2017: Super charge you word press website by Justin ThomasCtrl+F5 Bangalore 2017: Super charge you word press website by Justin Thomas
Ctrl+F5 Bangalore 2017: Super charge you word press website by Justin ThomasResellerClub
 
Introduction core web vitals
Introduction core web vitalsIntroduction core web vitals
Introduction core web vitalsSortdMediology
 
Speed Up Wordpress, Wordpress Horsepower
Speed Up Wordpress, Wordpress HorsepowerSpeed Up Wordpress, Wordpress Horsepower
Speed Up Wordpress, Wordpress HorsepowerRoss Johnson
 
How To Make Your Wordpress Website Load Faster - 20 Tips
How To Make Your Wordpress Website Load Faster - 20 TipsHow To Make Your Wordpress Website Load Faster - 20 Tips
How To Make Your Wordpress Website Load Faster - 20 TipsWorkurious
 
How We Localize & Mobilize WP Sites - Pubcon 2013
How We Localize & Mobilize WP Sites - Pubcon 2013How We Localize & Mobilize WP Sites - Pubcon 2013
How We Localize & Mobilize WP Sites - Pubcon 2013Search Commander, Inc.
 
I Can Haz More Performanz?
I Can Haz More Performanz?I Can Haz More Performanz?
I Can Haz More Performanz?Andy Melichar
 

Tendances (20)

Speed up your site! #wcmtl2015 by Meagan Hanes
Speed up your site! #wcmtl2015 by Meagan HanesSpeed up your site! #wcmtl2015 by Meagan Hanes
Speed up your site! #wcmtl2015 by Meagan Hanes
 
Core Web Vitals Optimization for any website, especially WordPress
Core Web Vitals Optimization for any website, especially WordPressCore Web Vitals Optimization for any website, especially WordPress
Core Web Vitals Optimization for any website, especially WordPress
 
How to Fix a Slow WordPress Site (and get A+ scores)
How to Fix a Slow WordPress Site (and get A+ scores)How to Fix a Slow WordPress Site (and get A+ scores)
How to Fix a Slow WordPress Site (and get A+ scores)
 
Tips for optimizing WordPress performance and usability
Tips for optimizing WordPress performance and usabilityTips for optimizing WordPress performance and usability
Tips for optimizing WordPress performance and usability
 
How webpage loading takes place?
How webpage loading takes place?How webpage loading takes place?
How webpage loading takes place?
 
WordPress optimization
WordPress optimizationWordPress optimization
WordPress optimization
 
WPblog's Ultimate WordPress Guide to Boost Your Website Performance
WPblog's Ultimate WordPress Guide to Boost Your Website Performance WPblog's Ultimate WordPress Guide to Boost Your Website Performance
WPblog's Ultimate WordPress Guide to Boost Your Website Performance
 
Web performance
Web performanceWeb performance
Web performance
 
Is your website's speed letting you down?
Is your website's speed letting you down?Is your website's speed letting you down?
Is your website's speed letting you down?
 
Speed!
Speed!Speed!
Speed!
 
Boosting your conversion rate through web performance improvements
Boosting your conversion rate through web performance improvementsBoosting your conversion rate through web performance improvements
Boosting your conversion rate through web performance improvements
 
Web Performance: 3 Stages to Success
Web Performance: 3 Stages to SuccessWeb Performance: 3 Stages to Success
Web Performance: 3 Stages to Success
 
Web performance optimization (WPO)
Web performance optimization (WPO)Web performance optimization (WPO)
Web performance optimization (WPO)
 
SearchLove San Diego 2018 | Tom Anthony | An Introduction to HTTP/2 & Service...
SearchLove San Diego 2018 | Tom Anthony | An Introduction to HTTP/2 & Service...SearchLove San Diego 2018 | Tom Anthony | An Introduction to HTTP/2 & Service...
SearchLove San Diego 2018 | Tom Anthony | An Introduction to HTTP/2 & Service...
 
Ctrl+F5 Bangalore 2017: Super charge you word press website by Justin Thomas
Ctrl+F5 Bangalore 2017: Super charge you word press website by Justin ThomasCtrl+F5 Bangalore 2017: Super charge you word press website by Justin Thomas
Ctrl+F5 Bangalore 2017: Super charge you word press website by Justin Thomas
 
Introduction core web vitals
Introduction core web vitalsIntroduction core web vitals
Introduction core web vitals
 
Speed Up Wordpress, Wordpress Horsepower
Speed Up Wordpress, Wordpress HorsepowerSpeed Up Wordpress, Wordpress Horsepower
Speed Up Wordpress, Wordpress Horsepower
 
How To Make Your Wordpress Website Load Faster - 20 Tips
How To Make Your Wordpress Website Load Faster - 20 TipsHow To Make Your Wordpress Website Load Faster - 20 Tips
How To Make Your Wordpress Website Load Faster - 20 Tips
 
How We Localize & Mobilize WP Sites - Pubcon 2013
How We Localize & Mobilize WP Sites - Pubcon 2013How We Localize & Mobilize WP Sites - Pubcon 2013
How We Localize & Mobilize WP Sites - Pubcon 2013
 
I Can Haz More Performanz?
I Can Haz More Performanz?I Can Haz More Performanz?
I Can Haz More Performanz?
 

Similaire à Performace optimization (increase website speed)

Frontend performance
Frontend performanceFrontend performance
Frontend performancesacred 8
 
DrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingDrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingAshok Modi
 
Front end optimization
Front end optimizationFront end optimization
Front end optimizationAbhishek Anand
 
Web Client Performance
Web Client PerformanceWeb Client Performance
Web Client PerformanceHerea Adrian
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax ApplicationsSiarhei Barysiuk
 
Building high performing web pages
Building high performing web pagesBuilding high performing web pages
Building high performing web pagesNilesh Bafna
 
Drupal performance and scalability
Drupal performance and scalabilityDrupal performance and scalability
Drupal performance and scalabilityTwinbit
 
How to optimize your Magento store
How to optimize your Magento store How to optimize your Magento store
How to optimize your Magento store Rasbor.com
 
SEO 101 - Google Page Speed Insights Explained
SEO 101 - Google Page Speed Insights Explained SEO 101 - Google Page Speed Insights Explained
SEO 101 - Google Page Speed Insights Explained Steve Weber
 
Improving Drupal Performances
Improving Drupal PerformancesImproving Drupal Performances
Improving Drupal PerformancesVladimir Ilic
 
The Need for Speed - SMX Sydney 2013
The Need for Speed - SMX Sydney 2013The Need for Speed - SMX Sydney 2013
The Need for Speed - SMX Sydney 2013Bastian Grimm
 
Web Speed And Scalability
Web Speed And ScalabilityWeb Speed And Scalability
Web Speed And ScalabilityJason Ragsdale
 
How to speed up your website
How to speed up your websiteHow to speed up your website
How to speed up your websiteVernalWeb
 
Magento performancenbs
Magento performancenbsMagento performancenbs
Magento performancenbsvarien
 
Website Performance at Client Level
Website Performance at Client LevelWebsite Performance at Client Level
Website Performance at Client LevelConstantin Stan
 
Open-source website performance tools
Open-source website performance toolsOpen-source website performance tools
Open-source website performance toolsArtur Cistov
 
Asp.net performance
Asp.net performanceAsp.net performance
Asp.net performanceAbhishek Sur
 
Csdn Drdobbs Tenni Theurer Yahoo
Csdn Drdobbs Tenni Theurer YahooCsdn Drdobbs Tenni Theurer Yahoo
Csdn Drdobbs Tenni Theurer Yahooguestb1b95b
 

Similaire à Performace optimization (increase website speed) (20)

Frontend performance
Frontend performanceFrontend performance
Frontend performance
 
DrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingDrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizing
 
Front end optimization
Front end optimizationFront end optimization
Front end optimization
 
Web Client Performance
Web Client PerformanceWeb Client Performance
Web Client Performance
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax Applications
 
Building high performing web pages
Building high performing web pagesBuilding high performing web pages
Building high performing web pages
 
Drupal performance and scalability
Drupal performance and scalabilityDrupal performance and scalability
Drupal performance and scalability
 
How to optimize your Magento store
How to optimize your Magento store How to optimize your Magento store
How to optimize your Magento store
 
Front-end performances
Front-end performancesFront-end performances
Front-end performances
 
SEO 101 - Google Page Speed Insights Explained
SEO 101 - Google Page Speed Insights Explained SEO 101 - Google Page Speed Insights Explained
SEO 101 - Google Page Speed Insights Explained
 
Improving Drupal Performances
Improving Drupal PerformancesImproving Drupal Performances
Improving Drupal Performances
 
The Need for Speed - SMX Sydney 2013
The Need for Speed - SMX Sydney 2013The Need for Speed - SMX Sydney 2013
The Need for Speed - SMX Sydney 2013
 
Web Speed And Scalability
Web Speed And ScalabilityWeb Speed And Scalability
Web Speed And Scalability
 
How to speed up your website
How to speed up your websiteHow to speed up your website
How to speed up your website
 
Magento performancenbs
Magento performancenbsMagento performancenbs
Magento performancenbs
 
Html Optimization for SEO
Html Optimization for SEOHtml Optimization for SEO
Html Optimization for SEO
 
Website Performance at Client Level
Website Performance at Client LevelWebsite Performance at Client Level
Website Performance at Client Level
 
Open-source website performance tools
Open-source website performance toolsOpen-source website performance tools
Open-source website performance tools
 
Asp.net performance
Asp.net performanceAsp.net performance
Asp.net performance
 
Csdn Drdobbs Tenni Theurer Yahoo
Csdn Drdobbs Tenni Theurer YahooCsdn Drdobbs Tenni Theurer Yahoo
Csdn Drdobbs Tenni Theurer Yahoo
 

Dernier

How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 

Dernier (20)

How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 

Performace optimization (increase website speed)

  • 1. Web Performance Optimization (WPO) General, Server Side and Technology level Techniques
  • 2. Outline General Level Optimization 1 2 Importance of Web Performance Server Side Optimization3 Technology Level Optimization4 Performance Measurement Sites5 References6
  • 3. Importance of Web Performance  Even a few seconds delay is enough to create an unpleasant user experience.  57% of online shoppers will wait 3 seconds or less before abandoning the site.  Google engineers found that users begin to get frustrated with a site after waiting just 400 milliseconds – literally the blink of an eye – for web pages to load. Source – Aberdeen Group
  • 4. Levels of Optimization General Level • Content • Cookie • CSS • JavaScript • Image • Mobile Server Level Technology Level
  • 6. General Level Optimization 1. Minimize HTTP Requests  Most of the time is tied up in downloading all the components in the page: images, stylesheets, scripts, Flash, etc.  How to minimize HTTP Request?  Combined files are a way to reduce the number of HTTP requests by combining all scripts and CSS into a single stylesheet and CSS respectively.  CSS Sprites are the preferred method for reducing the number of image requests.  Image maps combines multiple images to single image.  Browser Cache Usage - 40-60% of daily visitors to your site come in with an empty cache.
  • 7. 2. Put Stylesheets at the Top  Various research shows that moving stylesheets to the document HEAD makes pages appear to be loading faster.  The problem with putting stylesheets at the bottom of the document is that it prohibits progressive rendering and user’s stuck viewing a blank white page.  Placing stylesheets in the HEAD allows the page to render progressively.  Vital for pages with a lot of content and for users on slower Internet connections. General Level Optimization
  • 8. 3. Minify JavaScript and CSS  Minification reduces response time and the size.  Few popular tools for minifying are:  JSMin  YUI Compressor  Google Closure Compiler  Obfuscation is an alternative optimization.  Both methods achieves fairly the same size reduction (Minification achieved a 21% size reduction, where 25% for obfuscation), but obfuscation is bit risky with JavaScript.  Should minified in-line JS and CSS as well (5% reduction). General Level Optimization
  • 9. 4. Avoid CSS Expressions  CSS expressions are a powerful (and dangerous) way to set CSS properties dynamically.  Supported in IE starting with version 5, but were deprecated starting with IE8.  Adding a counter to the CSS expression allows us to keep track of when and how often a CSS expression is evaluated.  Solutions  Use one time expression instead of CSS expression.  For Dynamic throughout style property, use Event handler. background-color: expression( (new Date()).getHours()%2 ? "#B8D4FF" : "#F08A00" ); General Level Optimization
  • 10. 5. Make JavaScript and CSS External  Using external files produces faster pages.  JS and CSS files are cached.  In-lined increases the document’s size.  Many documents could re-use them.  To reduce HTTP requests in the front page:  In-line JavaScript and CSS, but dynamically download the external files after finished loading. General Level Optimization
  • 11. 6. Choose <link> over @import  The difference between them is that @import is the CSS mechanism to include a style sheet and <link> the HTML mechanism. However, browsers handle them differently, giving <link> a clear advantage in terms of performance.  In IE @import behaves the same as using <link> at the bottom of the page, so it's best not to use it. General Level Optimization
  • 12. 7. Put Scripts at Bottom  Browser do not download more than two components in parallel per hostname.  Block parallel downloads across all hostnames.  Block rendering of everything below them in the page.  Never uses document.write. General Level Optimization
  • 13. 8. Remove Duplicate Scripts  Two of Ten top sites contains duplicated script.  Main factors increase the odds of a script being duplicated in a single web page is team size and number of scripts.  Hurt performance by creating unnecessary HTTP requests and wasted JavaScript execution.  Solutions  Implement a script management module in your template system.  The typical way to include a script is to use the SCRIPT tag in your HTML page.  An alternative in PHP would be to create a function called InsertScript. <script type="text/javascript" src="menu_1.0.17.js"></script> <?php insertScript("menu.js") ?> General Level Optimization
  • 14. 9. Optimize Image  Image needs to be optimized before you FTP those images to your web server, after designer is done with creating the images for your web page.  Key things are  Check the GIFs, whether palette size corresponding to the number of colors in the image.  Try converting GIFs to PNGs (except for animations).  Run pngcrush (or any other PNG optimizer tool) on all your PNGs.  Run jpegtran on all your JPEGs. General Level Optimization
  • 15. 10. Optimize CSS Sprites  Arranging the images horizontally (makes the smaller file size).  Combining similar colors in a sprite helps you keep the color count low, ideally under 256 colors so to fit in a PNG8.  Don’t leave big gaps between the images in a sprite.  It makes the user agent requires less memory. General Level Optimization 11. Keep Components Under 25kb for Mobile Site  iPhone wont cache components > 25K (uncompressed size).  Minification is important because gzip alone may not be sufficient.
  • 16. 12. Don’t Scale Images in HTML  Do not use a bigger image than you need.  If you need <img width="100" height="100" src="mycat.jpg" alt="My Cat" /> then mycat.jpg should be 100x100px, rather than scale down from 500x500px image General Level Optimization
  • 17. 13. Make favicon.ico Small and Cacheable  Browser will always request it, better not to respond 404. • Cookies are sent every time its requested. • Also interferes with the download sequence in IE.  Solutions  Make it small, preferably under 1K.  Set Expires header when you feel comfortable.  Imagemagick can help you create small favicons. General Level Optimization
  • 18. 14. Avoid Empty Image src  Image with empty string src attribute occurs more than one will expect.  It appears in two form: –  Straight HTML  <img src=" ">  JavaScript  var img = new Image(); img.src = "";  Browser makes another request to your server.  Cripple your servers by sending a large amount of unexpected traffic.  Waste server computing cycles.  Possibly corrupt user data.  HTML5 instruct browsers not to make an additional request.  Empty image src can destroy your site. General Level Optimization
  • 19. 15. Avoid Redirects  Redirects are accomplished using the 301 and 302 status codes.  Redirects slow down the user experience.  Nothing can be rendered  Round-trip request  Add Expires headers to cache redirects.  Wasteful Redirect, i.e. when a trailing slash (/) is missing from a URL that should otherwise have one.  This is fixed in Apache by using Alias or mod_rewrite, or the DirectorySlash directive if you're using Apache handlers. HTTP/1.1 301 Moved Permanently Location: http://example.com/newuri Content-Type: text/html General Level Optimization
  • 20. 16. Make Ajax Cacheable  Expires or Cache-Control header.  Adding a timestamp to the URL – &t=1190241612.  When it has been modified, send with a new timestamp.  The most important way to improve the performance of Ajax is to make the responses cacheable 17. Avoid 404’s  Ineffectual response (i.e. 404 Not Found) is totally unnecessary and will slow down the user experience without any benefit. General Level Optimization
  • 21. 18. Reduce Cookie Size  HTTP cookies are used for a variety of reasons such as authentication and personalization.  It's important to keep the size of cookies as low as possible to minimize the impact on the user's response time.  Eliminate unnecessary cookies.  Keep cookie sizes small.  Setting cookies at the appropriate domain level.  Set an Expires date appropriately. An earlier Expires date or none removes the cookie sooner, improving the user response time General Level Optimization
  • 23. 1. Implement Content Delivery Network (CDN)  The users proximity has an impact on response times.  Solutions  Use a CDN: Akamai Technologies, EdgeCast, Amazon CloudFront, or level3.  Distribute your static content before distributing your dynamic content.  At Yahoo, using a CDN improved response times >= 20%. Server Level Optimization
  • 24. 2. Reduce DNS Lookups  Domain Name System (DNS) maps hostnames to IP addresses.  On average, takes 20-120 Milliseconds.  IE caches : DnsCacheTimeout : 30 minutes  Firefox : network.dnsCacheExpiration : 1 minute (Fasterfox changes this to 1 hour)  Reducing hostnames reduces the DNS lookups, But it reduces parallel downloads.  Better to split these components across at least two but no more than four hostnames. Server Level Optimization
  • 25. 3. Split Components Across Domains  Splitting components allows you to maximize parallel downloads.  Make sure you're using not more than 2-4 domains because of the DNS lookup penalty.  For Instance, you can host your HTML and dynamic content on www.example.org and split static components between static1.example.org and static2.example.org. Server Level Optimization
  • 26. 4. Use Cookie-free Domains for Components  Create www site and sub-domain.  that sub-domain is cookie-free.  Buy a whole new domain if already set on domain without www.  Yahoo! uses yimg.com,  YouTube uses ytimg.com,  Amazon uses images-amazon.com and so on.  Some proxies might refuse to cache the components that are requested with cookies. Server Level Optimization
  • 27. 5. Add Expires or Cache-Control Header  Use "Never expire" policy for static components by setting far future Expires header.  For dynamic components, use an appropriate Cache-Control header to help the browser with conditional requests.  Avoid unnecessary HTTP requests on subsequent page view after the first visit. Server Level Optimization
  • 28. 6. Gzip Components  Gzip is effective compression method compared to deflate.  Key Features are  Reduces response times.  The response size ~ 70% reduction.  90%+ of browsers support gzip.  Compress any text responses.  Image and PDF files SHOULD NOT be gzipped.  In Apache, the module configuring gzip depends on your version: Apache 1.3 uses mod_gzip while Apache 2.x uses mod_deflate. Server Level Optimization
  • 30. General Guidelines  Keep the Joomla! Version updated.  Choose extensions wisely.  Deactivate unused extensions, upgrade used.  Simplify your templates as much as possible.  Use Cache.  Optimize the MYSQL Statements.  Use limited number of Records in SQL. Enhance Joomla! Web
  • 31. 1. Flush Buffer Early  Normally, it may take 200 to 500ms for the backend server to stitch together the HTML page, once a user request a page.  The browser remains idle until data is received.  In PHP flush() function allows you to send your partially ready HTML response to the browser so that the browser can start fetching components while your backend is busy with the rest of the HTML page.  The benefit is mainly seen on busy backend or light frontend.  Flushing after the HEAD is optimal, as it allows to include any JS and CSS.  Example Technology Level Optimization ... <!-- css, js --> </head> <?php flush(); ?> <body> ... <!-- content -->
  • 32. Performance Measurement Sites  http://www.webpagetest.org/  http://tools.pingdom.com/  http://gtmetrix.com/  http://www.websiteoptimization.com/services/analyze/  http://site-perf.com/  https://developers.google.com/speed/pagespeed/insights  http://loadimpact.com/page-analyzer  http://newrelic.com/