SlideShare a Scribd company logo
By: Amit Kumar
Topic to discuss:
 1.What is The golden rule of performance.
 2.Things we do.
 3. Things We should do.
The golden rule of performance.
 For any phenomenon, 80% of the consequences come

from 20% of the causes.
: Vilfredo Pareto, an economist.

In our case, 80% of the time is spent by the User
depends on only 20% of the code.
Things we do.
 New database schema
 Optimised code
 Replicated architecture
 And so many huge complex task
What is front end?
 Everything after html document arrived to the

browser:
 Like HTML, JavaScript CSS, parsing , JavaScript
execution, network time for http request etc.
 5 % of the user wait time was to get the html request
and rest is used to download other things.
Time taken by yahoo.com.
Bad News !!!
 Browsers download only two to four components in

parallel per hostname.
Time taken by top website.
Time Retrieving HTML

Time Elsewhere

Yahoo!

10%

90%

Google

25%

75%

MySpace

9%

91%

MSN

5%

95%

ebay

5%

95%

Amazon

38%

62%

YouTube

9%

91%

CNN

15%

85%
Empty and full cache summary to
load yahoo.com
Things we should do!
 1.Minimize HTTP Requests

1.1 CSS sprite
1.2 Combined Scripts, and StyleSheets
 2.Add an Expires or a Cache-Control Header .

There are two aspects to this rule:

2.1 For static components: implement "Never expire" policy by
setting far future Expires header

2.2 For dynamic components: use an appropriate CacheControl header to help the browser with conditional requests

2.3 Expires headers are most often used with images, but they
should be used on all components including
scripts, stylesheets, and Flash components.
 3. Gzip Components
 Most web sites gzip their HTML documents. It's also

worthwhile to gzip your scripts and stylesheets, but
many web sites miss this opportunity. In fact, it's
worthwhile to compress any text response including
XML and JSON. Image and PDF files should not be
gzipped because they are already compressed.
 4.Put Stylesheets at the Top
 5.Put Scripts at the Bottom
 The HTTP/1.1 specification suggests that browsers

download no more than two components in parallel
per hostname.
 While a script is downloading, however, the browser
won't start any other downloads, even on different
hostnames.
 6. Avoid CSS Expressions
{background-color: expression( (new
Date()).getHours()%2 ? "#B8D4FF" : "#F08A00" );}
 The problem with expressions is that they are

evaluated more frequently than most people expect.
 7.Make JavaScript and CSS External
 Using external files in the real world generally produces

faster pages because the JavaScript and CSS files are cached
by the browser. JavaScript and CSS that are inlined in
HTML documents get downloaded every time the HTML
document is requested.
 This reduces the number of HTTP requests that are
needed, but increases the size of the HTML document. On
the other hand, if the JavaScript and CSS are in external
files cached by the browser, the size of the HTML
document is reduced without increasing the number of
HTTP requests.
 8.Minify JavaScript and CSS
 Minification is the practice of removing unnecessary






characters from code
9.Avoid Redirects
10.Use GET for AJAX Requests
POST is implemented in the browsers as a two-step
process: sending the headers first, then sending data.
11. Remove Duplicate Scripts
Unnecessary HTTP requests happen in Internet
Explorer, but not in Firefox.
 12. Use Cookie-free Domains for Components
 When the browser makes a request for a static image

and sends cookies together with the request, the server
doesn't have any use for those cookies. So they only
create network traffic for no good reason. You should
make sure static components are requested with
cookie-free requests. Create a subdomain and host all
your static components there.
 Yahoo! uses yimg.com, YouTube uses ytimg.com,
Amazon uses images-amazon.com and so on.
 WHERE DO WE STAND ???

http://www.pingdom.com/
 THANK YOU FOR YOUR VALUABLE TIME

More Related Content

PPT
Front End Website Optimization
ODP
Front-End Performance Optimizing
PPTX
PDF
Web application intro
PDF
1.Loading
PDF
Preparing your web services for Android and your Android app for web services...
PPT
Web Application Introduction
PDF
WordPress Theme Performance - WP Vienna meetup 8.6.2016
Front End Website Optimization
Front-End Performance Optimizing
Web application intro
1.Loading
Preparing your web services for Android and your Android app for web services...
Web Application Introduction
WordPress Theme Performance - WP Vienna meetup 8.6.2016

What's hot (20)

ODP
HTTP Basic - PHP
PPTX
Front end optimization
PDF
Understanding XHProf: Pinpointing Why Your Site is Slow and How to Fix it - S...
PDF
Optimising Web Application Frontend
PPTX
JS digest. Decemebr 2017
PPTX
Getting Started with Web Services
PPTX
An Introduction to GitHub for DBAs - Brent Ozar
PPT
HTML5 CSS3 The Future of Web Technologies
PPTX
Service workers: what and why UmbUKFest 2018!
PDF
The Case for HTTP/2 - EpicFEL Sept 2015
PDF
Nate Reist WCGR WP AJAX presentation
PPTX
ASP.NET Quick Wins - 20 Tips and Tricks To Shift Your Application into High Gear
PPTX
Windows Azure - Cloud Service Development Best Practices
PDF
WordPress&映像配信セミナー+さぶみっと!オフ会- 第2回 さぶみっと! WEB制作セミナー Supported by NTTスマートコネクト
PDF
さぶみっと
PPS
Sohamsg ajax
PPTX
That's crazy! how to build single page web apps
PPTX
Blazor - An Introduction
PDF
Wordpress vs html
PPTX
Optimizing your WordPress website
HTTP Basic - PHP
Front end optimization
Understanding XHProf: Pinpointing Why Your Site is Slow and How to Fix it - S...
Optimising Web Application Frontend
JS digest. Decemebr 2017
Getting Started with Web Services
An Introduction to GitHub for DBAs - Brent Ozar
HTML5 CSS3 The Future of Web Technologies
Service workers: what and why UmbUKFest 2018!
The Case for HTTP/2 - EpicFEL Sept 2015
Nate Reist WCGR WP AJAX presentation
ASP.NET Quick Wins - 20 Tips and Tricks To Shift Your Application into High Gear
Windows Azure - Cloud Service Development Best Practices
WordPress&映像配信セミナー+さぶみっと!オフ会- 第2回 さぶみっと! WEB制作セミナー Supported by NTTスマートコネクト
さぶみっと
Sohamsg ajax
That's crazy! how to build single page web apps
Blazor - An Introduction
Wordpress vs html
Optimizing your WordPress website
Ad

Viewers also liked (17)

PPTX
Contribuciones
DOCX
Obezitate
PDF
201309 130917200320-phpapp01
PPTX
Inv 03.statistics review a_macias_in_class_fall2013
PPT
Locked presentation (2)
PDF
อุปกรณ์เชื่อมต่อเครือข่ายคอมพิวเตอร์กรวรรณ
PPTX
How to save money on your food bills
PPTX
Presentació Col·legis
DOCX
Biomecanica piciorului
PPTX
PPTX
Smart ways to save money
DOC
țEsutul nervos
PPTX
Neo4j - Rede de relacionamentos baseada em grafos
PPTX
Rural Livelihood Diversification in Rice-based Areas of Bangladesh
DOCX
Programul wiliams
DOCX
Scolioza
PPT
Micro irrigation for enhancing water productivity in field crops
Contribuciones
Obezitate
201309 130917200320-phpapp01
Inv 03.statistics review a_macias_in_class_fall2013
Locked presentation (2)
อุปกรณ์เชื่อมต่อเครือข่ายคอมพิวเตอร์กรวรรณ
How to save money on your food bills
Presentació Col·legis
Biomecanica piciorului
Smart ways to save money
țEsutul nervos
Neo4j - Rede de relacionamentos baseada em grafos
Rural Livelihood Diversification in Rice-based Areas of Bangladesh
Programul wiliams
Scolioza
Micro irrigation for enhancing water productivity in field crops
Ad

Similar to improve website performance (20)

PDF
High performance website
PPTX
10 things you can do to speed up your web app today stir trek edition
PDF
Performance tuning of Websites
PPT
Frontend performance
PPTX
Performace optimization (increase website speed)
PPTX
Html Optimization for SEO
PPTX
Creating high-performance-web-sites
PDF
Web Performance Optimization (WPO)
PPT
Csdn Drdobbs Tenni Theurer Yahoo
PPT
High Performance Web Pages - 20 new best practices
PDF
7 Habits of Exceptional Performance
PPTX
Web Performance Optimization
PDF
High Performance Ajax Applications
PPTX
Website Performance
PPTX
Building high performance web apps.
PPTX
10 Things You Can Do to Speed Up Your Web App Today
PDF
Tips tricks deliver_high_performing_secure_web_pages
KEY
A rough guide to JavaScript Performance
PPTX
10 Tips to make your Website lightning-fast - SMX Stockholm 2012
PPT
Web performance Talk
High performance website
10 things you can do to speed up your web app today stir trek edition
Performance tuning of Websites
Frontend performance
Performace optimization (increase website speed)
Html Optimization for SEO
Creating high-performance-web-sites
Web Performance Optimization (WPO)
Csdn Drdobbs Tenni Theurer Yahoo
High Performance Web Pages - 20 new best practices
7 Habits of Exceptional Performance
Web Performance Optimization
High Performance Ajax Applications
Website Performance
Building high performance web apps.
10 Things You Can Do to Speed Up Your Web App Today
Tips tricks deliver_high_performing_secure_web_pages
A rough guide to JavaScript Performance
10 Tips to make your Website lightning-fast - SMX Stockholm 2012
Web performance Talk

Recently uploaded (20)

PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Spectroscopy.pptx food analysis technology
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Getting Started with Data Integration: FME Form 101
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Tartificialntelligence_presentation.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Empathic Computing: Creating Shared Understanding
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
Machine Learning_overview_presentation.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
A comparative analysis of optical character recognition models for extracting...
Dropbox Q2 2025 Financial Results & Investor Presentation
Spectroscopy.pptx food analysis technology
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Getting Started with Data Integration: FME Form 101
Encapsulation_ Review paper, used for researhc scholars
NewMind AI Weekly Chronicles - August'25-Week II
Big Data Technologies - Introduction.pptx
Tartificialntelligence_presentation.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
Digital-Transformation-Roadmap-for-Companies.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Unlocking AI with Model Context Protocol (MCP)
Empathic Computing: Creating Shared Understanding
Reach Out and Touch Someone: Haptics and Empathic Computing
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Group 1 Presentation -Planning and Decision Making .pptx
Machine Learning_overview_presentation.pptx
Electronic commerce courselecture one. Pdf
A comparative analysis of optical character recognition models for extracting...

improve website performance

  • 2. Topic to discuss:  1.What is The golden rule of performance.  2.Things we do.  3. Things We should do.
  • 3. The golden rule of performance.  For any phenomenon, 80% of the consequences come from 20% of the causes. : Vilfredo Pareto, an economist. In our case, 80% of the time is spent by the User depends on only 20% of the code.
  • 4. Things we do.  New database schema  Optimised code  Replicated architecture  And so many huge complex task
  • 5. What is front end?  Everything after html document arrived to the browser:  Like HTML, JavaScript CSS, parsing , JavaScript execution, network time for http request etc.  5 % of the user wait time was to get the html request and rest is used to download other things.
  • 6. Time taken by yahoo.com.
  • 7. Bad News !!!  Browsers download only two to four components in parallel per hostname.
  • 8. Time taken by top website. Time Retrieving HTML Time Elsewhere Yahoo! 10% 90% Google 25% 75% MySpace 9% 91% MSN 5% 95% ebay 5% 95% Amazon 38% 62% YouTube 9% 91% CNN 15% 85%
  • 9. Empty and full cache summary to load yahoo.com
  • 10. Things we should do!  1.Minimize HTTP Requests 1.1 CSS sprite 1.2 Combined Scripts, and StyleSheets  2.Add an Expires or a Cache-Control Header . There are two aspects to this rule:  2.1 For static components: implement "Never expire" policy by setting far future Expires header  2.2 For dynamic components: use an appropriate CacheControl header to help the browser with conditional requests  2.3 Expires headers are most often used with images, but they should be used on all components including scripts, stylesheets, and Flash components.
  • 11.  3. Gzip Components  Most web sites gzip their HTML documents. It's also worthwhile to gzip your scripts and stylesheets, but many web sites miss this opportunity. In fact, it's worthwhile to compress any text response including XML and JSON. Image and PDF files should not be gzipped because they are already compressed.  4.Put Stylesheets at the Top  5.Put Scripts at the Bottom
  • 12.  The HTTP/1.1 specification suggests that browsers download no more than two components in parallel per hostname.  While a script is downloading, however, the browser won't start any other downloads, even on different hostnames.  6. Avoid CSS Expressions {background-color: expression( (new Date()).getHours()%2 ? "#B8D4FF" : "#F08A00" );}
  • 13.  The problem with expressions is that they are evaluated more frequently than most people expect.
  • 14.  7.Make JavaScript and CSS External  Using external files in the real world generally produces faster pages because the JavaScript and CSS files are cached by the browser. JavaScript and CSS that are inlined in HTML documents get downloaded every time the HTML document is requested.  This reduces the number of HTTP requests that are needed, but increases the size of the HTML document. On the other hand, if the JavaScript and CSS are in external files cached by the browser, the size of the HTML document is reduced without increasing the number of HTTP requests.
  • 15.  8.Minify JavaScript and CSS  Minification is the practice of removing unnecessary      characters from code 9.Avoid Redirects 10.Use GET for AJAX Requests POST is implemented in the browsers as a two-step process: sending the headers first, then sending data. 11. Remove Duplicate Scripts Unnecessary HTTP requests happen in Internet Explorer, but not in Firefox.
  • 16.  12. Use Cookie-free Domains for Components  When the browser makes a request for a static image and sends cookies together with the request, the server doesn't have any use for those cookies. So they only create network traffic for no good reason. You should make sure static components are requested with cookie-free requests. Create a subdomain and host all your static components there.  Yahoo! uses yimg.com, YouTube uses ytimg.com, Amazon uses images-amazon.com and so on.
  • 17.  WHERE DO WE STAND ??? http://www.pingdom.com/
  • 18.  THANK YOU FOR YOUR VALUABLE TIME