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

What's hot (20)

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

Viewers also liked (17)

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

Similar to improve website performance (20)

PDF
High performance website
Chamnap Chhorn
 
PPTX
10 things you can do to speed up your web app today stir trek edition
Chris Love
 
PDF
Performance tuning of Websites
muHive Technologies
 
PPT
Frontend performance
sacred 8
 
PPTX
Performace optimization (increase website speed)
clickramanm
 
PPTX
Html Optimization for SEO
S. Ernest Paul ✪
 
PPTX
Creating high-performance-web-sites
chaos_bit
 
PDF
Web Performance Optimization (WPO)
Betclic Everest Group Tech Team
 
PPT
Csdn Drdobbs Tenni Theurer Yahoo
guestb1b95b
 
PPT
High Performance Web Pages - 20 new best practices
Stoyan Stefanov
 
PDF
7 Habits of Exceptional Performance
Nicole Sullivan
 
PPTX
Web Performance Optimization
Livares Technologies Pvt Ltd
 
PDF
High Performance Ajax Applications
Siarhei Barysiuk
 
PPTX
Website Performance
Hugo Fonseca
 
PPTX
Building high performance web apps.
Arshak Movsisyan
 
PPTX
10 Things You Can Do to Speed Up Your Web App Today
Chris Love
 
PDF
Tips tricks deliver_high_performing_secure_web_pages
Aditya Singh
 
KEY
A rough guide to JavaScript Performance
allmarkedup
 
PPTX
10 Tips to make your Website lightning-fast - SMX Stockholm 2012
Bastian Grimm
 
PPT
Web performance Talk
Prasoon Agrawal
 
High performance website
Chamnap Chhorn
 
10 things you can do to speed up your web app today stir trek edition
Chris Love
 
Performance tuning of Websites
muHive Technologies
 
Frontend performance
sacred 8
 
Performace optimization (increase website speed)
clickramanm
 
Html Optimization for SEO
S. Ernest Paul ✪
 
Creating high-performance-web-sites
chaos_bit
 
Web Performance Optimization (WPO)
Betclic Everest Group Tech Team
 
Csdn Drdobbs Tenni Theurer Yahoo
guestb1b95b
 
High Performance Web Pages - 20 new best practices
Stoyan Stefanov
 
7 Habits of Exceptional Performance
Nicole Sullivan
 
Web Performance Optimization
Livares Technologies Pvt Ltd
 
High Performance Ajax Applications
Siarhei Barysiuk
 
Website Performance
Hugo Fonseca
 
Building high performance web apps.
Arshak Movsisyan
 
10 Things You Can Do to Speed Up Your Web App Today
Chris Love
 
Tips tricks deliver_high_performing_secure_web_pages
Aditya Singh
 
A rough guide to JavaScript Performance
allmarkedup
 
10 Tips to make your Website lightning-fast - SMX Stockholm 2012
Bastian Grimm
 
Web performance Talk
Prasoon Agrawal
 
Ad

Recently uploaded (20)

PDF
How Current Advanced Cyber Threats Transform Business Operation
Eryk Budi Pratama
 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PPTX
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PPTX
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
PDF
Lecture A - AI Workflows for Banking.pdf
Dr. LAM Yat-fai (林日辉)
 
PDF
introduction to computer hardware and sofeware
chauhanshraddha2007
 
PDF
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PDF
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
Integrating IIoT with SCADA in Oil & Gas A Technical Perspective.pdf
Rejig Digital
 
PPTX
Machine Learning Benefits Across Industries
SynapseIndia
 
PPTX
Agentic AI in Healthcare Driving the Next Wave of Digital Transformation
danielle hunter
 
PDF
The Past, Present & Future of Kenya's Digital Transformation
Moses Kemibaro
 
PDF
Researching The Best Chat SDK Providers in 2025
Ray Fields
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
How Current Advanced Cyber Threats Transform Business Operation
Eryk Budi Pratama
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
Lecture A - AI Workflows for Banking.pdf
Dr. LAM Yat-fai (林日辉)
 
introduction to computer hardware and sofeware
chauhanshraddha2007
 
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
The Future of Artificial Intelligence (AI)
Mukul
 
Integrating IIoT with SCADA in Oil & Gas A Technical Perspective.pdf
Rejig Digital
 
Machine Learning Benefits Across Industries
SynapseIndia
 
Agentic AI in Healthcare Driving the Next Wave of Digital Transformation
danielle hunter
 
The Past, Present & Future of Kenya's Digital Transformation
Moses Kemibaro
 
Researching The Best Chat SDK Providers in 2025
Ray Fields
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 

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