SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Downloaden Sie, um offline zu lesen
Resources
•
•
•
•

Code.google.com
Yahoo Developers
Web Site Caching (Book)
Few more websites, came across while writing
recipes.

Sanjeev Kumar Jaiswal
http://www.aliencoders.com

2
Table Of Contents

Sanjeev Kumar Jaiswal
http://www.aliencoders.com

3
Following HTML Standards
• <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">

•
•
•
•

CSS files at the top under the head tag
JavaScript scripts at the bottom of the body tag
Use the tableless design whenever possible
Use proper ending methods of one-sided tags.
Ex: <br /> instead of <br>

• Tags should be properly closed
• Avoid deprecated tags like <b>, <i>
• Use HTML validator (FF Plugin) for better results

Sanjeev Kumar Jaiswal
http://www.aliencoders.com

4
Rules for using the CSS, JavaScript, and image
files

• Using external files for stylesheets and
JavaScript
• Using correct order of stylesheets, scripts, and
inline JavaScript code
• Don't scale images in HTML
• Removing Duplicate
• Avoid CSS @import
• Avoiding empty image src
Sanjeev Kumar Jaiswal
http://www.aliencoders.com

5
Minimizing HTTP Requests
•
•
•
•
•
•

Reducing DNS Lookups
Using combined CSS files and scripts
Using CSS Sprites (spriteme.org)
Using imagemaps (FF Plugin imagemap editor)
Firefox plugins Speed DNS
Minify js scripts and CSS files

Sanjeev Kumar Jaiswal
http://www.aliencoders.com

6
Optimizing Images
• Use text with CSS3 instead of images, if
possible
• Use web format of images like gif or png
• Use photo editor to use exact image size
required
• Use the height and width attributes under the
img tag

Sanjeev Kumar Jaiswal
http://www.aliencoders.com

7
Enabling Compression
• For IIS Folks!
http://technet.microsoft.com/en-us/library/cc730629(v=ws.10).aspx

• For PHP Folks
<?php
if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')
ob_start("ob_gzhandler");
else
ob_start();
?>

Sanjeev Kumar Jaiswal
http://www.aliencoders.com

8
Enabling Compression cont…
For Apache Geeks
• Apache has two compression modes,
mod_deflate and mod_gzip.
http://httpd.apache.org/docs/2.0/mod/mod_deflate.html

• compress specific file types:
<files *.html>
SetOutputFilter DEFLATE
</files>

• or use AddOutputFilterByType
AddOutputFilterByType DEFLATE text/html text/plain text/xml

Sanjeev Kumar Jaiswal
http://www.aliencoders.com

9
Adding an Expires or Cache-Control header
• It will only help in optimizing the website if it has been
already visited and the cache is not empty, else it has no
effect
• Add the Expires metadata for static contents.
<META HTTP-EQUIV="Expires" CONTENT="Sat, 04 Dec 2021 21:29:02 GMT">

• The response header would contain the Expires term like this:
Expires: Sat, 04 Dec 2021 21:29:02 GMT

• Add Cache-Control metadata for dynamic contents
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="PUBLIC">

Sanjeev Kumar Jaiswal
http://www.aliencoders.com

10
Adding an Expires or Cache-Control header contd..
The following are the two cache-related header parts that you should
know (rfc 2616, section 14.9):
• cache-request-directive = "no-cache" | "no-store" | "max-age" "="
delta-seconds | "max-stale" [ "=" delta-seconds ] | "min-fresh" "="
delta-seconds | "no-transform" | "only-if-cached" | cache-extension
• cache-response-directive ="public" | "private" [ "=" <"> 1#fieldname
<"> ] | "no-cache" [ "=" <"> 1#field-name <"> ] | "no-store" |
"notransform"
| "must-revalidate" | "proxy-revalidate" | "max-age" "="
delta-seconds | "s-maxage" "=" delta-seconds
Sanjeev Kumar Jaiswal
http://www.aliencoders.com

11
Setting up browser Caching
• Tools->Options->Advanced->Network->offline
Storage
•
•
•
•

about:config->browser.cache.check_doc_frequency
Gateway Cache like Akamai , AWS etc
In CGI: print "Cache-Control: max-age = 3600n";
Apache
### activate mod_expires
ExpiresActive On
ExpiresByType image/gif seconds
Sanjeev Kumar Jaiswal
http://www.aliencoders.com

12
Make favicon small and cacheable
• Modern browsers request for favicon.ico by default
• Make it of 16x16 pixels and lesser file size say 1KB
• favicon always gets downloaded while making a
request to the server
• set the expires header to a future date.
• If you are going to change the extension of your
favicon, be sure to use the <link> tag in HTML
• it's a good idea to always have the favicon.ico file in
your root directory, to avoid a “File not found” error

Sanjeev Kumar Jaiswal
http://www.aliencoders.com

13
Configuring Etags (Entity Tags)
• browser's cache contents are the same or different
from the origin server
• ETags useful for the CSS, JavaScript, and image files
• Enable ETag if served from the same server else disable
• add the following line at the end of httpd.conf or
apache2.conf:
– FileETag INode MTime Size

• To Disable add lines at the end of httpd.conf or
apache2.conf:
– FileETag None
– Header unset ETag
Sanjeev Kumar Jaiswal
http://www.aliencoders.com

14
Using Apache mod_pagespeed
• It supports only :
– Debian/Ubuntu (32&64)
– CentOS/Fedora (32&64)

• Install
– pkg -i mod-pagespeed-*.deb apt-get -f install (Debian)
– rpm -U mod-pagespeed-*.rpm (For CentOS)

• It installs mod_pagespeed.so for Apache 2.2 and
mod_pagespeed_ap24.so for Apache 2.4
• <IfModule pagespeed_module>#config lines here</IfModule>
• # mod_pagespeed output handler.
– AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html

• mod_pagespeed automatically enables mod_deflate for compression

• ModPagespeed on/off/unplugged
Sanjeev Kumar Jaiswal
http://www.aliencoders.com

15
Thanks
• Thanks to Ravindran for his valuable feedback
and reviews for this book 
• Thanks to Vignesh and Siva for their guidance
in my regular job.
• Thanks to teammates and AlienCoders Users
who always support me to go for something
big 

Sanjeev Kumar Jaiswal
http://www.aliencoders.com

16
Support Us
•
•
•
•
•
•
•

Facebook: https://www.facebook.com/aliencoders
Twitter: https://twitter.com/aliencoders
YouTube: http://www.youtube.com/user/jassics
LinkedIn: http://www.linkedin.com/groups/Alien-Coders-4642371
G+: https://plus.google.com/115500638348284368431/posts
Pinterest: http://www.pinterest.com/aliencoders/
Website: http://www.aliencoders.com

17

Weitere ähnliche Inhalte

Was ist angesagt?

High performance WordPress
High performance WordPressHigh performance WordPress
High performance WordPressMikel King
 
WordPress Theme and Plugin Optimization - WordPress Arvika March '14
WordPress Theme and Plugin Optimization - WordPress Arvika March '14WordPress Theme and Plugin Optimization - WordPress Arvika March '14
WordPress Theme and Plugin Optimization - WordPress Arvika March '14slobodanmanic
 
Wordpress optimization
Wordpress optimizationWordpress optimization
Wordpress optimizationpaudelvinay
 
Front End Website Optimization
Front End Website OptimizationFront End Website Optimization
Front End Website OptimizationGerard Sychay
 
10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...Otto Kekäläinen
 
Asp.net performance secrets
Asp.net performance secretsAsp.net performance secrets
Asp.net performance secretsMahmoud Ghoz
 
Creating Dynamic Sidebars & Widgets in WordPress
Creating Dynamic Sidebars & Widgets in WordPressCreating Dynamic Sidebars & Widgets in WordPress
Creating Dynamic Sidebars & Widgets in WordPressJason Yingling
 
10 Powerful Ways to Optimize Your EE Site
10 Powerful Ways to Optimize Your EE Site10 Powerful Ways to Optimize Your EE Site
10 Powerful Ways to Optimize Your EE SiteLeslie Doherty
 
Adobe CQ5 for Developers - Introduction
Adobe CQ5 for Developers - IntroductionAdobe CQ5 for Developers - Introduction
Adobe CQ5 for Developers - IntroductionTekno Point
 
Rest services caching
Rest services cachingRest services caching
Rest services cachingSperasoft
 
WordPress Security - 12 WordPress Security Fundamentals
WordPress Security - 12 WordPress Security FundamentalsWordPress Security - 12 WordPress Security Fundamentals
WordPress Security - 12 WordPress Security Fundamentalsfindingsimple
 
Managing Multisite: Lessons from a Large Network
Managing Multisite: Lessons from a Large NetworkManaging Multisite: Lessons from a Large Network
Managing Multisite: Lessons from a Large NetworkWilliam Earnhardt
 
Saving Time with WP-CLI
Saving Time with WP-CLISaving Time with WP-CLI
Saving Time with WP-CLITaylor Lovett
 
8 Ways to Hack a WordPress website
8 Ways to Hack a WordPress website8 Ways to Hack a WordPress website
8 Ways to Hack a WordPress websiteSiteGround.com
 
Roy foubister (hosting high traffic sites on a tight budget)
Roy foubister (hosting high traffic sites on a tight budget)Roy foubister (hosting high traffic sites on a tight budget)
Roy foubister (hosting high traffic sites on a tight budget)WordCamp Cape Town
 
Modernizing WordPress Search with Elasticsearch
Modernizing WordPress Search with ElasticsearchModernizing WordPress Search with Elasticsearch
Modernizing WordPress Search with ElasticsearchTaylor Lovett
 
WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019Anam Ahmed
 
Optimizing WordPress for Performance - WordCamp Houston
Optimizing WordPress for Performance - WordCamp HoustonOptimizing WordPress for Performance - WordCamp Houston
Optimizing WordPress for Performance - WordCamp HoustonChris Olbekson
 
Introdcution to Adobe CQ
Introdcution to Adobe CQIntrodcution to Adobe CQ
Introdcution to Adobe CQRest West
 

Was ist angesagt? (20)

High performance WordPress
High performance WordPressHigh performance WordPress
High performance WordPress
 
WordPress Theme and Plugin Optimization - WordPress Arvika March '14
WordPress Theme and Plugin Optimization - WordPress Arvika March '14WordPress Theme and Plugin Optimization - WordPress Arvika March '14
WordPress Theme and Plugin Optimization - WordPress Arvika March '14
 
Wordpress optimization
Wordpress optimizationWordpress optimization
Wordpress optimization
 
Optimize wordpress
Optimize wordpressOptimize wordpress
Optimize wordpress
 
Front End Website Optimization
Front End Website OptimizationFront End Website Optimization
Front End Website Optimization
 
10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...
 
Asp.net performance secrets
Asp.net performance secretsAsp.net performance secrets
Asp.net performance secrets
 
Creating Dynamic Sidebars & Widgets in WordPress
Creating Dynamic Sidebars & Widgets in WordPressCreating Dynamic Sidebars & Widgets in WordPress
Creating Dynamic Sidebars & Widgets in WordPress
 
10 Powerful Ways to Optimize Your EE Site
10 Powerful Ways to Optimize Your EE Site10 Powerful Ways to Optimize Your EE Site
10 Powerful Ways to Optimize Your EE Site
 
Adobe CQ5 for Developers - Introduction
Adobe CQ5 for Developers - IntroductionAdobe CQ5 for Developers - Introduction
Adobe CQ5 for Developers - Introduction
 
Rest services caching
Rest services cachingRest services caching
Rest services caching
 
WordPress Security - 12 WordPress Security Fundamentals
WordPress Security - 12 WordPress Security FundamentalsWordPress Security - 12 WordPress Security Fundamentals
WordPress Security - 12 WordPress Security Fundamentals
 
Managing Multisite: Lessons from a Large Network
Managing Multisite: Lessons from a Large NetworkManaging Multisite: Lessons from a Large Network
Managing Multisite: Lessons from a Large Network
 
Saving Time with WP-CLI
Saving Time with WP-CLISaving Time with WP-CLI
Saving Time with WP-CLI
 
8 Ways to Hack a WordPress website
8 Ways to Hack a WordPress website8 Ways to Hack a WordPress website
8 Ways to Hack a WordPress website
 
Roy foubister (hosting high traffic sites on a tight budget)
Roy foubister (hosting high traffic sites on a tight budget)Roy foubister (hosting high traffic sites on a tight budget)
Roy foubister (hosting high traffic sites on a tight budget)
 
Modernizing WordPress Search with Elasticsearch
Modernizing WordPress Search with ElasticsearchModernizing WordPress Search with Elasticsearch
Modernizing WordPress Search with Elasticsearch
 
WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019
 
Optimizing WordPress for Performance - WordCamp Houston
Optimizing WordPress for Performance - WordCamp HoustonOptimizing WordPress for Performance - WordCamp Houston
Optimizing WordPress for Performance - WordCamp Houston
 
Introdcution to Adobe CQ
Introdcution to Adobe CQIntrodcution to Adobe CQ
Introdcution to Adobe CQ
 

Andere mochten auch

Using copy.com app for uploading and sharing files
Using copy.com app for uploading and sharing filesUsing copy.com app for uploading and sharing files
Using copy.com app for uploading and sharing filesRachabodin Suwannakanthi
 
Web intelligence-future of next generation web
Web intelligence-future of next generation webWeb intelligence-future of next generation web
Web intelligence-future of next generation webSanjeev Kumar Jaiswal
 
Presentation on Graphical password-technology to make system more secured
Presentation on Graphical password-technology to make system more securedPresentation on Graphical password-technology to make system more secured
Presentation on Graphical password-technology to make system more securedSanjeev Kumar Jaiswal
 
Introduction to Mobile adhoc-network
Introduction to Mobile adhoc-networkIntroduction to Mobile adhoc-network
Introduction to Mobile adhoc-networkSanjeev Kumar Jaiswal
 
Kayla ppt whatmakes psych a science psych 1
Kayla ppt whatmakes psych a science psych 1Kayla ppt whatmakes psych a science psych 1
Kayla ppt whatmakes psych a science psych 1Steve Kashdan
 
White paper on Spool space in teradata
White paper on Spool space in teradataWhite paper on Spool space in teradata
White paper on Spool space in teradataSanjeev Kumar Jaiswal
 
Application development for mobile phones
Application development for mobile phonesApplication development for mobile phones
Application development for mobile phonesSanjeev Kumar Jaiswal
 
C:\fakepath\psychological disorders
C:\fakepath\psychological disordersC:\fakepath\psychological disorders
C:\fakepath\psychological disordersSteve Kashdan
 
The Roles of Ambassador and Community in ORCID
The Roles of Ambassador and Community in ORCIDThe Roles of Ambassador and Community in ORCID
The Roles of Ambassador and Community in ORCIDKeita Bando
 
Your First Home By The Book Seminar Us Jim Gatos
Your First Home By The Book Seminar Us Jim GatosYour First Home By The Book Seminar Us Jim Gatos
Your First Home By The Book Seminar Us Jim GatosJim Gatos
 
Online Strategy And Development In A Nutshell
Online Strategy And Development In A NutshellOnline Strategy And Development In A Nutshell
Online Strategy And Development In A Nutshellaleemb
 
《2012 年商品說明(不良營商手法)(修訂)條例》研討會 - 通訊事務管理局辦公室
《2012 年商品說明(不良營商手法)(修訂)條例》研討會 - 通訊事務管理局辦公室《2012 年商品說明(不良營商手法)(修訂)條例》研討會 - 通訊事務管理局辦公室
《2012 年商品說明(不良營商手法)(修訂)條例》研討會 - 通訊事務管理局辦公室HKAIM
 

Andere mochten auch (20)

Ludowici - Austmine
Ludowici - AustmineLudowici - Austmine
Ludowici - Austmine
 
Digital Museum
Digital MuseumDigital Museum
Digital Museum
 
Using copy.com app for uploading and sharing files
Using copy.com app for uploading and sharing filesUsing copy.com app for uploading and sharing files
Using copy.com app for uploading and sharing files
 
Web intelligence-future of next generation web
Web intelligence-future of next generation webWeb intelligence-future of next generation web
Web intelligence-future of next generation web
 
Presentation on Graphical password-technology to make system more secured
Presentation on Graphical password-technology to make system more securedPresentation on Graphical password-technology to make system more secured
Presentation on Graphical password-technology to make system more secured
 
Introduction to Mobile adhoc-network
Introduction to Mobile adhoc-networkIntroduction to Mobile adhoc-network
Introduction to Mobile adhoc-network
 
Energy multiutility v3
Energy  multiutility v3Energy  multiutility v3
Energy multiutility v3
 
Kayla ppt whatmakes psych a science psych 1
Kayla ppt whatmakes psych a science psych 1Kayla ppt whatmakes psych a science psych 1
Kayla ppt whatmakes psych a science psych 1
 
Presentación lazytech
Presentación lazytechPresentación lazytech
Presentación lazytech
 
White paper on Spool space in teradata
White paper on Spool space in teradataWhite paper on Spool space in teradata
White paper on Spool space in teradata
 
Beekman5 std ppt_09
Beekman5 std ppt_09Beekman5 std ppt_09
Beekman5 std ppt_09
 
Application development for mobile phones
Application development for mobile phonesApplication development for mobile phones
Application development for mobile phones
 
C:\fakepath\psychological disorders
C:\fakepath\psychological disordersC:\fakepath\psychological disorders
C:\fakepath\psychological disorders
 
The Roles of Ambassador and Community in ORCID
The Roles of Ambassador and Community in ORCIDThe Roles of Ambassador and Community in ORCID
The Roles of Ambassador and Community in ORCID
 
Wearable Biosensors
Wearable BiosensorsWearable Biosensors
Wearable Biosensors
 
Beekman5 std ppt_05
Beekman5 std ppt_05Beekman5 std ppt_05
Beekman5 std ppt_05
 
Your First Home By The Book Seminar Us Jim Gatos
Your First Home By The Book Seminar Us Jim GatosYour First Home By The Book Seminar Us Jim Gatos
Your First Home By The Book Seminar Us Jim Gatos
 
Online Strategy And Development In A Nutshell
Online Strategy And Development In A NutshellOnline Strategy And Development In A Nutshell
Online Strategy And Development In A Nutshell
 
Pantone fcr-sp2010f
Pantone fcr-sp2010fPantone fcr-sp2010f
Pantone fcr-sp2010f
 
《2012 年商品說明(不良營商手法)(修訂)條例》研討會 - 通訊事務管理局辦公室
《2012 年商品說明(不良營商手法)(修訂)條例》研討會 - 通訊事務管理局辦公室《2012 年商品說明(不良營商手法)(修訂)條例》研討會 - 通訊事務管理局辦公室
《2012 年商品說明(不良營商手法)(修訂)條例》研討會 - 通訊事務管理局辦公室
 

Ähnlich wie Presentation on Instant page speed optimization

High performance website
High performance websiteHigh performance website
High performance websiteChamnap Chhorn
 
Going on an HTTP Diet: Front-End Web Performance
Going on an HTTP Diet: Front-End Web PerformanceGoing on an HTTP Diet: Front-End Web Performance
Going on an HTTP Diet: Front-End Web PerformanceAdam Norwood
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsTaylor Lovett
 
Igor Bondarenko - Magento2 Performance Bottlenecks: How to avoid it
Igor Bondarenko - Magento2 Performance Bottlenecks: How to avoid itIgor Bondarenko - Magento2 Performance Bottlenecks: How to avoid it
Igor Bondarenko - Magento2 Performance Bottlenecks: How to avoid itMeet Magento Italy
 
A11y Conference Talk: Building an Accessible WordPress Theme
A11y Conference Talk: Building an Accessible WordPress ThemeA11y Conference Talk: Building an Accessible WordPress Theme
A11y Conference Talk: Building an Accessible WordPress ThemeTomAuger
 
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
 
An Unexpected Solution to Microservices UI Composition
An Unexpected Solution to Microservices UI CompositionAn Unexpected Solution to Microservices UI Composition
An Unexpected Solution to Microservices UI CompositionDr. Arif Wider
 
10 Tips to make your Website lightning-fast - SMX Stockholm 2012
10 Tips to make your Website lightning-fast - SMX Stockholm 201210 Tips to make your Website lightning-fast - SMX Stockholm 2012
10 Tips to make your Website lightning-fast - SMX Stockholm 2012Bastian Grimm
 
Html5 shubelal
Html5 shubelalHtml5 shubelal
Html5 shubelalShub
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax ApplicationsSiarhei Barysiuk
 
How_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_FarmHow_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_FarmNigel Price
 
Client Side Optimization
Client Side OptimizationClient Side Optimization
Client Side OptimizationPatrick Huesler
 
Minimize website page loading time – 20+ advanced SEO tips
Minimize website page loading time – 20+ advanced SEO tipsMinimize website page loading time – 20+ advanced SEO tips
Minimize website page loading time – 20+ advanced SEO tipsCgColors
 
Highly Maintainable, Efficient, and Optimized CSS
Highly Maintainable, Efficient, and Optimized CSSHighly Maintainable, Efficient, and Optimized CSS
Highly Maintainable, Efficient, and Optimized CSSZoe Gillenwater
 
Intro to html5 Boilerplate
Intro to html5 BoilerplateIntro to html5 Boilerplate
Intro to html5 BoilerplateMichael Enslow
 
Untying the Knots of Web Dev with Internet Explorer
Untying the Knots of Web Dev with Internet Explorer Untying the Knots of Web Dev with Internet Explorer
Untying the Knots of Web Dev with Internet Explorer Sarah Dutkiewicz
 
Building Faster Websites
Building Faster WebsitesBuilding Faster Websites
Building Faster WebsitesCraig Walker
 
Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11Jess Coburn
 
Best practices-wordpress-enterprise
Best practices-wordpress-enterpriseBest practices-wordpress-enterprise
Best practices-wordpress-enterpriseTaylor Lovett
 

Ähnlich wie Presentation on Instant page speed optimization (20)

High performance website
High performance websiteHigh performance website
High performance website
 
Going on an HTTP Diet: Front-End Web Performance
Going on an HTTP Diet: Front-End Web PerformanceGoing on an HTTP Diet: Front-End Web Performance
Going on an HTTP Diet: Front-End Web Performance
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress Applications
 
Igor Bondarenko - Magento2 Performance Bottlenecks: How to avoid it
Igor Bondarenko - Magento2 Performance Bottlenecks: How to avoid itIgor Bondarenko - Magento2 Performance Bottlenecks: How to avoid it
Igor Bondarenko - Magento2 Performance Bottlenecks: How to avoid it
 
A11y Conference Talk: Building an Accessible WordPress Theme
A11y Conference Talk: Building an Accessible WordPress ThemeA11y Conference Talk: Building an Accessible WordPress Theme
A11y Conference Talk: Building an Accessible WordPress Theme
 
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
 
An Unexpected Solution to Microservices UI Composition
An Unexpected Solution to Microservices UI CompositionAn Unexpected Solution to Microservices UI Composition
An Unexpected Solution to Microservices UI Composition
 
10 Tips to make your Website lightning-fast - SMX Stockholm 2012
10 Tips to make your Website lightning-fast - SMX Stockholm 201210 Tips to make your Website lightning-fast - SMX Stockholm 2012
10 Tips to make your Website lightning-fast - SMX Stockholm 2012
 
Html5 shubelal
Html5 shubelalHtml5 shubelal
Html5 shubelal
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax Applications
 
How_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_FarmHow_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_Farm
 
Client Side Optimization
Client Side OptimizationClient Side Optimization
Client Side Optimization
 
Minimize website page loading time – 20+ advanced SEO tips
Minimize website page loading time – 20+ advanced SEO tipsMinimize website page loading time – 20+ advanced SEO tips
Minimize website page loading time – 20+ advanced SEO tips
 
Highly Maintainable, Efficient, and Optimized CSS
Highly Maintainable, Efficient, and Optimized CSSHighly Maintainable, Efficient, and Optimized CSS
Highly Maintainable, Efficient, and Optimized CSS
 
Intro to html5 Boilerplate
Intro to html5 BoilerplateIntro to html5 Boilerplate
Intro to html5 Boilerplate
 
Untying the Knots of Web Dev with Internet Explorer
Untying the Knots of Web Dev with Internet Explorer Untying the Knots of Web Dev with Internet Explorer
Untying the Knots of Web Dev with Internet Explorer
 
Building Faster Websites
Building Faster WebsitesBuilding Faster Websites
Building Faster Websites
 
Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11
 
Caching in Kentico 11
Caching in Kentico 11Caching in Kentico 11
Caching in Kentico 11
 
Best practices-wordpress-enterprise
Best practices-wordpress-enterpriseBest practices-wordpress-enterprise
Best practices-wordpress-enterprise
 

Kürzlich hochgeladen

Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 

Kürzlich hochgeladen (20)

Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 

Presentation on Instant page speed optimization

  • 1.
  • 2. Resources • • • • Code.google.com Yahoo Developers Web Site Caching (Book) Few more websites, came across while writing recipes. Sanjeev Kumar Jaiswal http://www.aliencoders.com 2
  • 3. Table Of Contents Sanjeev Kumar Jaiswal http://www.aliencoders.com 3
  • 4. Following HTML Standards • <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"> • • • • CSS files at the top under the head tag JavaScript scripts at the bottom of the body tag Use the tableless design whenever possible Use proper ending methods of one-sided tags. Ex: <br /> instead of <br> • Tags should be properly closed • Avoid deprecated tags like <b>, <i> • Use HTML validator (FF Plugin) for better results Sanjeev Kumar Jaiswal http://www.aliencoders.com 4
  • 5. Rules for using the CSS, JavaScript, and image files • Using external files for stylesheets and JavaScript • Using correct order of stylesheets, scripts, and inline JavaScript code • Don't scale images in HTML • Removing Duplicate • Avoid CSS @import • Avoiding empty image src Sanjeev Kumar Jaiswal http://www.aliencoders.com 5
  • 6. Minimizing HTTP Requests • • • • • • Reducing DNS Lookups Using combined CSS files and scripts Using CSS Sprites (spriteme.org) Using imagemaps (FF Plugin imagemap editor) Firefox plugins Speed DNS Minify js scripts and CSS files Sanjeev Kumar Jaiswal http://www.aliencoders.com 6
  • 7. Optimizing Images • Use text with CSS3 instead of images, if possible • Use web format of images like gif or png • Use photo editor to use exact image size required • Use the height and width attributes under the img tag Sanjeev Kumar Jaiswal http://www.aliencoders.com 7
  • 8. Enabling Compression • For IIS Folks! http://technet.microsoft.com/en-us/library/cc730629(v=ws.10).aspx • For PHP Folks <?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') ob_start("ob_gzhandler"); else ob_start(); ?> Sanjeev Kumar Jaiswal http://www.aliencoders.com 8
  • 9. Enabling Compression cont… For Apache Geeks • Apache has two compression modes, mod_deflate and mod_gzip. http://httpd.apache.org/docs/2.0/mod/mod_deflate.html • compress specific file types: <files *.html> SetOutputFilter DEFLATE </files> • or use AddOutputFilterByType AddOutputFilterByType DEFLATE text/html text/plain text/xml Sanjeev Kumar Jaiswal http://www.aliencoders.com 9
  • 10. Adding an Expires or Cache-Control header • It will only help in optimizing the website if it has been already visited and the cache is not empty, else it has no effect • Add the Expires metadata for static contents. <META HTTP-EQUIV="Expires" CONTENT="Sat, 04 Dec 2021 21:29:02 GMT"> • The response header would contain the Expires term like this: Expires: Sat, 04 Dec 2021 21:29:02 GMT • Add Cache-Control metadata for dynamic contents <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="PUBLIC"> Sanjeev Kumar Jaiswal http://www.aliencoders.com 10
  • 11. Adding an Expires or Cache-Control header contd.. The following are the two cache-related header parts that you should know (rfc 2616, section 14.9): • cache-request-directive = "no-cache" | "no-store" | "max-age" "=" delta-seconds | "max-stale" [ "=" delta-seconds ] | "min-fresh" "=" delta-seconds | "no-transform" | "only-if-cached" | cache-extension • cache-response-directive ="public" | "private" [ "=" <"> 1#fieldname <"> ] | "no-cache" [ "=" <"> 1#field-name <"> ] | "no-store" | "notransform" | "must-revalidate" | "proxy-revalidate" | "max-age" "=" delta-seconds | "s-maxage" "=" delta-seconds Sanjeev Kumar Jaiswal http://www.aliencoders.com 11
  • 12. Setting up browser Caching • Tools->Options->Advanced->Network->offline Storage • • • • about:config->browser.cache.check_doc_frequency Gateway Cache like Akamai , AWS etc In CGI: print "Cache-Control: max-age = 3600n"; Apache ### activate mod_expires ExpiresActive On ExpiresByType image/gif seconds Sanjeev Kumar Jaiswal http://www.aliencoders.com 12
  • 13. Make favicon small and cacheable • Modern browsers request for favicon.ico by default • Make it of 16x16 pixels and lesser file size say 1KB • favicon always gets downloaded while making a request to the server • set the expires header to a future date. • If you are going to change the extension of your favicon, be sure to use the <link> tag in HTML • it's a good idea to always have the favicon.ico file in your root directory, to avoid a “File not found” error Sanjeev Kumar Jaiswal http://www.aliencoders.com 13
  • 14. Configuring Etags (Entity Tags) • browser's cache contents are the same or different from the origin server • ETags useful for the CSS, JavaScript, and image files • Enable ETag if served from the same server else disable • add the following line at the end of httpd.conf or apache2.conf: – FileETag INode MTime Size • To Disable add lines at the end of httpd.conf or apache2.conf: – FileETag None – Header unset ETag Sanjeev Kumar Jaiswal http://www.aliencoders.com 14
  • 15. Using Apache mod_pagespeed • It supports only : – Debian/Ubuntu (32&64) – CentOS/Fedora (32&64) • Install – pkg -i mod-pagespeed-*.deb apt-get -f install (Debian) – rpm -U mod-pagespeed-*.rpm (For CentOS) • It installs mod_pagespeed.so for Apache 2.2 and mod_pagespeed_ap24.so for Apache 2.4 • <IfModule pagespeed_module>#config lines here</IfModule> • # mod_pagespeed output handler. – AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html • mod_pagespeed automatically enables mod_deflate for compression • ModPagespeed on/off/unplugged Sanjeev Kumar Jaiswal http://www.aliencoders.com 15
  • 16. Thanks • Thanks to Ravindran for his valuable feedback and reviews for this book  • Thanks to Vignesh and Siva for their guidance in my regular job. • Thanks to teammates and AlienCoders Users who always support me to go for something big  Sanjeev Kumar Jaiswal http://www.aliencoders.com 16
  • 17. Support Us • • • • • • • Facebook: https://www.facebook.com/aliencoders Twitter: https://twitter.com/aliencoders YouTube: http://www.youtube.com/user/jassics LinkedIn: http://www.linkedin.com/groups/Alien-Coders-4642371 G+: https://plus.google.com/115500638348284368431/posts Pinterest: http://www.pinterest.com/aliencoders/ Website: http://www.aliencoders.com 17