SlideShare a Scribd company logo
1 of 21
Download to read offline
Web Site Optimization

Why ???

To know some basic rules/practices while
developing a web-application.

Whom ???

Web devlopers who are working html,css,js and
other web technology.

What ???

Its difficult to implement all the points that we
discuss today. But we can check something.
Web Site Optimization
In this session we'll go through 4 basic stuffs.

Basic optimization rules

Optimizing assets (images, scripts, and styles)

Optimizations specific to scripts

Optimizations specific to styles
Web Site Optimization

Decrease Download Sizes

Keep all the assets as lightweight as possible

Creating lean HTML code

Make Fewer HTTP Requests

Combine scripts and style sheets

Use image sprites

Avoid redirects

Avoid frames
Basic Optimization Rules
Web Site Optimization

Use a Content Delivery Network (CDN)

Host Assets on Different Domains but Reduce
DNS Lookups

Place Assets on a Cookie-free Domain

Split the Assets Among Domains

Use the Header Expiry/caching

Serve gzipped Content

Handling web images
Optimizing Assets
Web Site Optimization
Using a Content Delivery Network – CDN

CDN is a network of servers in different
geographical locations.

Each server has a copy of a site’s files. When a
visitor to your site requests a file, the file is
delivered from the nearest server

Its expensive :(
Optimizing Assets
Web Site Optimization
Why host assets on different domains ?????
Seems its an extra headache for me !!!!! :(

The biggest impact on end-user response times
is the number of components in the page.

Each component requires an extra HTTP
request.

Browser allows a limited number of component
for parallel downloading per host. (mostly only
2)
Optimizing Assets
Web Site Optimization
Lets see what if there is parallel download....
Lets assume we have 10 components along with
the page.
Optimizing Assets
Web Site Optimization
What if components are on different domains..
( Create subdomains and host assets )
Optimizing Assets
Web Site Optimization
Warning !!!!!!!!!!

Depending on your bandwidth and CPU speed,
too many parallel downloads can degrade
performance.

It takes about 20-120 milliseconds for DNS
(Domain Name System) to resolve IP address
for a given hostname or domain name and the
browser cannot do anything until the process is
properly completed.
Optimizing Assets
Web Site Optimization
Place Assets on a Cookie-free Domain

If you set a lot of cookies, the request headers
for your pages will increase in size, since those
cookies are sent with each request.

If you use subdomains to host your assets, you
need to make sure that the cookies you set are
for your canonical domain name (e.g.
www.example.org) and not for the top-level
domain name (e.g. example.org).
Optimizing Assets
Web Site Optimization
Customized Expiry header.....

By using a customized Expiry header, your web
components like images, static files, CSS,
Javascript skipped unnecessary HTTP request
when the same user reload the page for the
second time.

Setting the Expires header in Apache is easy:
Lets see the example on next slide
Optimizing Assets
Web Site Optimization
Example Expiry header.....
Add an .htaccess file that contains the following
directives to the root folder of your i1 and i2
subdomains
ExpiresActive On
ExpiresDefault "modification plus 10 years"
If you want, you can even set an expiration date per file
type:
ExpiresActive On
ExpiresByType application/x-javascript "modification plus 2 years"
ExpiresByType text/css "modification plus 5 years"
For more : http://httpd.apache.org/docs/2.0/mod/mod_expires.html
Optimizing Assets
Web Site Optimization
Handling Web Images...
Images are important part of your website.
However if they are not properly optimize, they
can become a burden and end up utilizing
unpredictably large amount of bandwidths on
daily basis.

Don’t Scale Images. Always practice inserting the
width and height for each images. Also don’t scale
down an image just because you need a smaller
version on the web. For example: Do not force scale a
200×200 px image to 50×50 px for your website by
altering the width and height. Get a 50×50 px instead.
Optimizing Assets
Web Site Optimization
Serve gzipped Content...

Apache 1.x and 2.x can automatically compress
files, but neither one comes with a compressor
enabled by default. Enabling compression
reduces CSS, HTML, and JavaScript file sizes
by 55-65% and speeds up overall page load
times by 35-40%.

Apache uses plug-in modules to add
functionality. For Apache 1.x, use the free
mod_gzip module to compress files. For
Apache 2.x, use mod_gzip or the built-in
mod_deflate module.
Optimizing Assets
Web Site Optimization
For gzipped Content...

The mod_gzip module can be used with Apache 1.x or 2.x,
but it doesn’t come with either Apache distribution. You’ll
need to download and install it separately.

Add the following lines to your server configuration file or
to a site’s “.htaccess” file:
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>
Optimizing Assets
Web Site Optimization
For gzipped Content...

For IIS
http://www.smallworkarounds.net/2009/01/aspnet-iis-tricks-using-
gzip.html
http://jeeshenlee.com/2010/08/01/how-to-gzip-on-asp-net-and-godaddy/
Optimizing Assets
Web Site Optimization

Merge .js f iles

Minify scripts

For Minify http://compressor.ebiene.de/

http://javascriptcompressor.com/

Place scripts at the bottom of the page

Remove duplicates
Javascript Optimizations
Web Site Optimization
Merge script files ….

You should aim for your JavaScripts to make as
few requests as possible; ideally, this also
means that you should have only one .js file.
This task is as simple as taking all .js script files
and placing them into a single file.
Example : http://code.google.com/p/phpflair/
Javascript Optimizations
Web Site Optimization

Merge and Minify

For Minify http://compressor.ebiene.de/

http://www.cleancss.com/

Place styles at the top of the page

Ban Expressions

#content {

left: expression(document.body.offsetWidth)

}
CSS Optimizations
Web Site Optimization
#element-id{
background-image: url(image.png);
background-position: -8px -8px;
width: 16px;
height: 16px;
}
Web Site Optimization

Firebug’s Net panel for Firefox, at
http://www.getfirebug.com

YSlow, Yahoo!’s performance extension to
Firebug, at http://developer.yahoo.com/yslow/

LiveHTTP Headers for Firefox, at
http://livehttpheaders.mozdev.org/

Fiddler — for IE, but also a general-purpose
packet sniffer, at
http://www.fiddlertool.com/fiddler/

Web Inspector for Safari, at
http://webkit.org/blog/?p=41
TOOLS FOR PERFORMANCE OPTIMIZATION

More Related Content

What's hot

Sample SEO presentation for clients
Sample SEO presentation for clientsSample SEO presentation for clients
Sample SEO presentation for clientsSiddu Hosageri
 
How to dominate SEO 2022
How to dominate SEO 2022How to dominate SEO 2022
How to dominate SEO 2022Navneet Kaushal
 
SEO Audit Report Format
SEO Audit Report Format SEO Audit Report Format
SEO Audit Report Format Pankaj Bisht
 
Top 10 Free SEO Tools
Top 10 Free SEO ToolsTop 10 Free SEO Tools
Top 10 Free SEO ToolsSimplilearn
 
Website Analysis Report : SEO, CRO Website Audit.
Website Analysis Report : SEO, CRO Website Audit.Website Analysis Report : SEO, CRO Website Audit.
Website Analysis Report : SEO, CRO Website Audit.Tarak Turki
 
Google Ads | Google Ads Tutorial 2019 | Google AdWords Tutorial 2019 | PPC Ad...
Google Ads | Google Ads Tutorial 2019 | Google AdWords Tutorial 2019 | PPC Ad...Google Ads | Google Ads Tutorial 2019 | Google AdWords Tutorial 2019 | PPC Ad...
Google Ads | Google Ads Tutorial 2019 | Google AdWords Tutorial 2019 | PPC Ad...Simplilearn
 
SERP Layout on Desktop Search_Training Deck
SERP Layout on Desktop Search_Training DeckSERP Layout on Desktop Search_Training Deck
SERP Layout on Desktop Search_Training DeckSilvia Alongi
 
SEO-off page optimization technique
SEO-off page optimization technique SEO-off page optimization technique
SEO-off page optimization technique shrikant87
 
Importance of Backlinks In SEO
Importance of Backlinks In SEOImportance of Backlinks In SEO
Importance of Backlinks In SEOAarav Infotech
 
Google Search Console: An Ultimate Guide
Google Search Console: An Ultimate GuideGoogle Search Console: An Ultimate Guide
Google Search Console: An Ultimate GuideTyler Horvath
 
Website Pre SEO Analysis Report- Online Marketing: Search Engine Optimization
Website Pre SEO Analysis Report- Online Marketing: Search Engine OptimizationWebsite Pre SEO Analysis Report- Online Marketing: Search Engine Optimization
Website Pre SEO Analysis Report- Online Marketing: Search Engine OptimizationVikesh Sanwalodia
 
YouTube Marketing Strategy 2020
YouTube Marketing Strategy 2020YouTube Marketing Strategy 2020
YouTube Marketing Strategy 2020StoryXpress Inc.
 
Keyword Research Presentation .pdf
Keyword Research Presentation .pdfKeyword Research Presentation .pdf
Keyword Research Presentation .pdfTheoRuby1
 

What's hot (20)

Sample SEO presentation for clients
Sample SEO presentation for clientsSample SEO presentation for clients
Sample SEO presentation for clients
 
SEO-Presentation.pdf
SEO-Presentation.pdfSEO-Presentation.pdf
SEO-Presentation.pdf
 
How to dominate SEO 2022
How to dominate SEO 2022How to dominate SEO 2022
How to dominate SEO 2022
 
SEO
SEOSEO
SEO
 
SEO Audit Report Format
SEO Audit Report Format SEO Audit Report Format
SEO Audit Report Format
 
Sample SEO Proposal
Sample SEO ProposalSample SEO Proposal
Sample SEO Proposal
 
Top 10 Free SEO Tools
Top 10 Free SEO ToolsTop 10 Free SEO Tools
Top 10 Free SEO Tools
 
Website Analysis Report : SEO, CRO Website Audit.
Website Analysis Report : SEO, CRO Website Audit.Website Analysis Report : SEO, CRO Website Audit.
Website Analysis Report : SEO, CRO Website Audit.
 
Google Ads | Google Ads Tutorial 2019 | Google AdWords Tutorial 2019 | PPC Ad...
Google Ads | Google Ads Tutorial 2019 | Google AdWords Tutorial 2019 | PPC Ad...Google Ads | Google Ads Tutorial 2019 | Google AdWords Tutorial 2019 | PPC Ad...
Google Ads | Google Ads Tutorial 2019 | Google AdWords Tutorial 2019 | PPC Ad...
 
SERP Layout on Desktop Search_Training Deck
SERP Layout on Desktop Search_Training DeckSERP Layout on Desktop Search_Training Deck
SERP Layout on Desktop Search_Training Deck
 
Google Ads Training
Google Ads TrainingGoogle Ads Training
Google Ads Training
 
SEO-off page optimization technique
SEO-off page optimization technique SEO-off page optimization technique
SEO-off page optimization technique
 
Importance of Backlinks In SEO
Importance of Backlinks In SEOImportance of Backlinks In SEO
Importance of Backlinks In SEO
 
Google Search Console: An Ultimate Guide
Google Search Console: An Ultimate GuideGoogle Search Console: An Ultimate Guide
Google Search Console: An Ultimate Guide
 
A Complete SEO Audit Template. Includes Actionable Tips & Insights
A Complete SEO Audit Template. Includes Actionable Tips & InsightsA Complete SEO Audit Template. Includes Actionable Tips & Insights
A Complete SEO Audit Template. Includes Actionable Tips & Insights
 
Off page seo
Off page seo Off page seo
Off page seo
 
Website Pre SEO Analysis Report- Online Marketing: Search Engine Optimization
Website Pre SEO Analysis Report- Online Marketing: Search Engine OptimizationWebsite Pre SEO Analysis Report- Online Marketing: Search Engine Optimization
Website Pre SEO Analysis Report- Online Marketing: Search Engine Optimization
 
YouTube Marketing Strategy 2020
YouTube Marketing Strategy 2020YouTube Marketing Strategy 2020
YouTube Marketing Strategy 2020
 
SEO Strategy ppt
SEO Strategy ppt SEO Strategy ppt
SEO Strategy ppt
 
Keyword Research Presentation .pdf
Keyword Research Presentation .pdfKeyword Research Presentation .pdf
Keyword Research Presentation .pdf
 

Viewers also liked

Django - The Web framework for perfectionists with deadlines
Django - The Web framework for perfectionists with deadlinesDjango - The Web framework for perfectionists with deadlines
Django - The Web framework for perfectionists with deadlinesMarkus Zapke-Gründemann
 
Rabbitmq & Postgresql
Rabbitmq & PostgresqlRabbitmq & Postgresql
Rabbitmq & PostgresqlLucio Grenzi
 
2007 - 应用系统脆弱性概论
2007 - 应用系统脆弱性概论 2007 - 应用系统脆弱性概论
2007 - 应用系统脆弱性概论 Na Lee
 
The Django Book, Chapter 16: django.contrib
The Django Book, Chapter 16: django.contribThe Django Book, Chapter 16: django.contrib
The Django Book, Chapter 16: django.contribTzu-ping Chung
 
Django e il Rap Elia Contini
Django e il Rap Elia ContiniDjango e il Rap Elia Contini
Django e il Rap Elia ContiniWEBdeBS
 
라이트닝 토크 2015 파이콘
라이트닝 토크 2015 파이콘라이트닝 토크 2015 파이콘
라이트닝 토크 2015 파이콘Jiho Lee
 
Django - The Web framework for perfectionists with deadlines
Django - The Web framework  for perfectionists with deadlinesDjango - The Web framework  for perfectionists with deadlines
Django - The Web framework for perfectionists with deadlinesMarkus Zapke-Gründemann
 
NoSql Day - Apertura
NoSql Day - AperturaNoSql Day - Apertura
NoSql Day - AperturaWEBdeBS
 
Django mongodb -djangoday_
Django mongodb -djangoday_Django mongodb -djangoday_
Django mongodb -djangoday_WEBdeBS
 
2016 py con2016_lightingtalk_php to python
2016 py con2016_lightingtalk_php to python2016 py con2016_lightingtalk_php to python
2016 py con2016_lightingtalk_php to pythonJiho Lee
 

Viewers also liked (20)

Html5 History-API
Html5 History-APIHtml5 History-API
Html5 History-API
 
EuroDjangoCon 2009 - Ein Rückblick
EuroDjangoCon 2009 - Ein RückblickEuroDjangoCon 2009 - Ein Rückblick
EuroDjangoCon 2009 - Ein Rückblick
 
Load testing
Load testingLoad testing
Load testing
 
Django - The Web framework for perfectionists with deadlines
Django - The Web framework for perfectionists with deadlinesDjango - The Web framework for perfectionists with deadlines
Django - The Web framework for perfectionists with deadlines
 
Digesting jQuery
Digesting jQueryDigesting jQuery
Digesting jQuery
 
Rabbitmq & Postgresql
Rabbitmq & PostgresqlRabbitmq & Postgresql
Rabbitmq & Postgresql
 
2007 - 应用系统脆弱性概论
2007 - 应用系统脆弱性概论 2007 - 应用系统脆弱性概论
2007 - 应用系统脆弱性概论
 
The Django Book, Chapter 16: django.contrib
The Django Book, Chapter 16: django.contribThe Django Book, Chapter 16: django.contrib
The Django Book, Chapter 16: django.contrib
 
PyClab.__init__(self)
PyClab.__init__(self)PyClab.__init__(self)
PyClab.__init__(self)
 
2 × 3 = 6
2 × 3 = 62 × 3 = 6
2 × 3 = 6
 
Django e il Rap Elia Contini
Django e il Rap Elia ContiniDjango e il Rap Elia Contini
Django e il Rap Elia Contini
 
라이트닝 토크 2015 파이콘
라이트닝 토크 2015 파이콘라이트닝 토크 2015 파이콘
라이트닝 토크 2015 파이콘
 
Django - The Web framework for perfectionists with deadlines
Django - The Web framework  for perfectionists with deadlinesDjango - The Web framework  for perfectionists with deadlines
Django - The Web framework for perfectionists with deadlines
 
Bottle - Python Web Microframework
Bottle - Python Web MicroframeworkBottle - Python Web Microframework
Bottle - Python Web Microframework
 
NoSql Day - Apertura
NoSql Day - AperturaNoSql Day - Apertura
NoSql Day - Apertura
 
Django mongodb -djangoday_
Django mongodb -djangoday_Django mongodb -djangoday_
Django mongodb -djangoday_
 
Vim for Mere Mortals
Vim for Mere MortalsVim for Mere Mortals
Vim for Mere Mortals
 
Django-Queryset
Django-QuerysetDjango-Queryset
Django-Queryset
 
2016 py con2016_lightingtalk_php to python
2016 py con2016_lightingtalk_php to python2016 py con2016_lightingtalk_php to python
2016 py con2016_lightingtalk_php to python
 
User-centered open source
User-centered open sourceUser-centered open source
User-centered open source
 

Similar to Website optimization

Frontend performance
Frontend performanceFrontend performance
Frontend performancesacred 8
 
Web site loading time optimization
Web site loading time optimizationWeb site loading time optimization
Web site loading time optimizationDamith Kothalawala
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax ApplicationsSiarhei Barysiuk
 
DrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingDrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingAshok Modi
 
Joomla Content Delivery Networks
Joomla Content Delivery NetworksJoomla Content Delivery Networks
Joomla Content Delivery NetworksMike Carson
 
WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019Anam Ahmed
 
Improving web site performance and scalability while saving
Improving web site performance and scalability while savingImproving web site performance and scalability while saving
Improving web site performance and scalability while savingmdc11
 
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
 
Performace optimization (increase website speed)
Performace optimization (increase website speed)Performace optimization (increase website speed)
Performace optimization (increase website speed)clickramanm
 
Optimizing the performance of WordPress
Optimizing the performance of WordPressOptimizing the performance of WordPress
Optimizing the performance of WordPressJosh Highland Giese
 
Make Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speedMake Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speedAndy Kucharski
 
Drupal Frontend Performance and Scalability
Drupal Frontend Performance and ScalabilityDrupal Frontend Performance and Scalability
Drupal Frontend Performance and ScalabilityAshok Modi
 
Drupal performance optimization Best Practices
Drupal performance optimization Best PracticesDrupal performance optimization Best Practices
Drupal performance optimization Best PracticesRatnesh kumar, CSM
 
5 Ways to Optimize Your WordPress Site
5 Ways to Optimize Your WordPress Site5 Ways to Optimize Your WordPress Site
5 Ways to Optimize Your WordPress SiteMarkupBox
 
Speed up Your Joomla Site for Ultimate Performance
Speed up Your Joomla Site for Ultimate PerformanceSpeed up Your Joomla Site for Ultimate Performance
Speed up Your Joomla Site for Ultimate PerformanceJoomlaDay Australia
 
wordpress-performance-presentation
wordpress-performance-presentationwordpress-performance-presentation
wordpress-performance-presentationArun Janarthanan
 

Similar to Website optimization (20)

Frontend performance
Frontend performanceFrontend performance
Frontend performance
 
Web site loading time optimization
Web site loading time optimizationWeb site loading time optimization
Web site loading time optimization
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax Applications
 
23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress
 
DrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingDrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizing
 
Speed!
Speed!Speed!
Speed!
 
Joomla Content Delivery Networks
Joomla Content Delivery NetworksJoomla Content Delivery Networks
Joomla Content Delivery Networks
 
WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019
 
Caching 101
Caching 101Caching 101
Caching 101
 
Improving web site performance and scalability while saving
Improving web site performance and scalability while savingImproving web site performance and scalability while saving
Improving web site performance and scalability while saving
 
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
 
Performace optimization (increase website speed)
Performace optimization (increase website speed)Performace optimization (increase website speed)
Performace optimization (increase website speed)
 
Optimizing the performance of WordPress
Optimizing the performance of WordPressOptimizing the performance of WordPress
Optimizing the performance of WordPress
 
Make Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speedMake Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speed
 
Drupal Frontend Performance and Scalability
Drupal Frontend Performance and ScalabilityDrupal Frontend Performance and Scalability
Drupal Frontend Performance and Scalability
 
Drupal performance optimization Best Practices
Drupal performance optimization Best PracticesDrupal performance optimization Best Practices
Drupal performance optimization Best Practices
 
5 Ways to Optimize Your WordPress Site
5 Ways to Optimize Your WordPress Site5 Ways to Optimize Your WordPress Site
5 Ways to Optimize Your WordPress Site
 
Speed up Your Joomla Site for Ultimate Performance
Speed up Your Joomla Site for Ultimate PerformanceSpeed up Your Joomla Site for Ultimate Performance
Speed up Your Joomla Site for Ultimate Performance
 
wordpress-performance-presentation
wordpress-performance-presentationwordpress-performance-presentation
wordpress-performance-presentation
 
Html Optimization for SEO
Html Optimization for SEOHtml Optimization for SEO
Html Optimization for SEO
 

More from Mindfire Solutions (20)

Physician Search and Review
Physician Search and ReviewPhysician Search and Review
Physician Search and Review
 
diet management app
diet management appdiet management app
diet management app
 
Business Technology Solution
Business Technology SolutionBusiness Technology Solution
Business Technology Solution
 
Remote Health Monitoring
Remote Health MonitoringRemote Health Monitoring
Remote Health Monitoring
 
Influencer Marketing Solution
Influencer Marketing SolutionInfluencer Marketing Solution
Influencer Marketing Solution
 
ELMAH
ELMAHELMAH
ELMAH
 
High Availability of Azure Applications
High Availability of Azure ApplicationsHigh Availability of Azure Applications
High Availability of Azure Applications
 
IOT Hands On
IOT Hands OnIOT Hands On
IOT Hands On
 
Glimpse of Loops Vs Set
Glimpse of Loops Vs SetGlimpse of Loops Vs Set
Glimpse of Loops Vs Set
 
Oracle Sql Developer-Getting Started
Oracle Sql Developer-Getting StartedOracle Sql Developer-Getting Started
Oracle Sql Developer-Getting Started
 
Adaptive Layout In iOS 8
Adaptive Layout In iOS 8Adaptive Layout In iOS 8
Adaptive Layout In iOS 8
 
Introduction to Auto-layout : iOS/Mac
Introduction to Auto-layout : iOS/MacIntroduction to Auto-layout : iOS/Mac
Introduction to Auto-layout : iOS/Mac
 
LINQPad - utility Tool
LINQPad - utility ToolLINQPad - utility Tool
LINQPad - utility Tool
 
Get started with watch kit development
Get started with watch kit developmentGet started with watch kit development
Get started with watch kit development
 
Swift vs Objective-C
Swift vs Objective-CSwift vs Objective-C
Swift vs Objective-C
 
Material Design in Android
Material Design in AndroidMaterial Design in Android
Material Design in Android
 
Introduction to OData
Introduction to ODataIntroduction to OData
Introduction to OData
 
Ext js Part 2- MVC
Ext js Part 2- MVCExt js Part 2- MVC
Ext js Part 2- MVC
 
ExtJs Basic Part-1
ExtJs Basic Part-1ExtJs Basic Part-1
ExtJs Basic Part-1
 
Spring Security Introduction
Spring Security IntroductionSpring Security Introduction
Spring Security Introduction
 

Recently uploaded

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
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
 
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
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 

Recently uploaded (20)

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
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.
 
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
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 

Website optimization

  • 1. Web Site Optimization  Why ???  To know some basic rules/practices while developing a web-application.  Whom ???  Web devlopers who are working html,css,js and other web technology.  What ???  Its difficult to implement all the points that we discuss today. But we can check something.
  • 2. Web Site Optimization In this session we'll go through 4 basic stuffs.  Basic optimization rules  Optimizing assets (images, scripts, and styles)  Optimizations specific to scripts  Optimizations specific to styles
  • 3. Web Site Optimization  Decrease Download Sizes  Keep all the assets as lightweight as possible  Creating lean HTML code  Make Fewer HTTP Requests  Combine scripts and style sheets  Use image sprites  Avoid redirects  Avoid frames Basic Optimization Rules
  • 4. Web Site Optimization  Use a Content Delivery Network (CDN)  Host Assets on Different Domains but Reduce DNS Lookups  Place Assets on a Cookie-free Domain  Split the Assets Among Domains  Use the Header Expiry/caching  Serve gzipped Content  Handling web images Optimizing Assets
  • 5. Web Site Optimization Using a Content Delivery Network – CDN  CDN is a network of servers in different geographical locations.  Each server has a copy of a site’s files. When a visitor to your site requests a file, the file is delivered from the nearest server  Its expensive :( Optimizing Assets
  • 6. Web Site Optimization Why host assets on different domains ????? Seems its an extra headache for me !!!!! :(  The biggest impact on end-user response times is the number of components in the page.  Each component requires an extra HTTP request.  Browser allows a limited number of component for parallel downloading per host. (mostly only 2) Optimizing Assets
  • 7. Web Site Optimization Lets see what if there is parallel download.... Lets assume we have 10 components along with the page. Optimizing Assets
  • 8. Web Site Optimization What if components are on different domains.. ( Create subdomains and host assets ) Optimizing Assets
  • 9. Web Site Optimization Warning !!!!!!!!!!  Depending on your bandwidth and CPU speed, too many parallel downloads can degrade performance.  It takes about 20-120 milliseconds for DNS (Domain Name System) to resolve IP address for a given hostname or domain name and the browser cannot do anything until the process is properly completed. Optimizing Assets
  • 10. Web Site Optimization Place Assets on a Cookie-free Domain  If you set a lot of cookies, the request headers for your pages will increase in size, since those cookies are sent with each request.  If you use subdomains to host your assets, you need to make sure that the cookies you set are for your canonical domain name (e.g. www.example.org) and not for the top-level domain name (e.g. example.org). Optimizing Assets
  • 11. Web Site Optimization Customized Expiry header.....  By using a customized Expiry header, your web components like images, static files, CSS, Javascript skipped unnecessary HTTP request when the same user reload the page for the second time.  Setting the Expires header in Apache is easy: Lets see the example on next slide Optimizing Assets
  • 12. Web Site Optimization Example Expiry header..... Add an .htaccess file that contains the following directives to the root folder of your i1 and i2 subdomains ExpiresActive On ExpiresDefault "modification plus 10 years" If you want, you can even set an expiration date per file type: ExpiresActive On ExpiresByType application/x-javascript "modification plus 2 years" ExpiresByType text/css "modification plus 5 years" For more : http://httpd.apache.org/docs/2.0/mod/mod_expires.html Optimizing Assets
  • 13. Web Site Optimization Handling Web Images... Images are important part of your website. However if they are not properly optimize, they can become a burden and end up utilizing unpredictably large amount of bandwidths on daily basis.  Don’t Scale Images. Always practice inserting the width and height for each images. Also don’t scale down an image just because you need a smaller version on the web. For example: Do not force scale a 200×200 px image to 50×50 px for your website by altering the width and height. Get a 50×50 px instead. Optimizing Assets
  • 14. Web Site Optimization Serve gzipped Content...  Apache 1.x and 2.x can automatically compress files, but neither one comes with a compressor enabled by default. Enabling compression reduces CSS, HTML, and JavaScript file sizes by 55-65% and speeds up overall page load times by 35-40%.  Apache uses plug-in modules to add functionality. For Apache 1.x, use the free mod_gzip module to compress files. For Apache 2.x, use mod_gzip or the built-in mod_deflate module. Optimizing Assets
  • 15. Web Site Optimization For gzipped Content...  The mod_gzip module can be used with Apache 1.x or 2.x, but it doesn’t come with either Apache distribution. You’ll need to download and install it separately.  Add the following lines to your server configuration file or to a site’s “.htaccess” file: <IfModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file .(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* </IfModule> Optimizing Assets
  • 16. Web Site Optimization For gzipped Content...  For IIS http://www.smallworkarounds.net/2009/01/aspnet-iis-tricks-using- gzip.html http://jeeshenlee.com/2010/08/01/how-to-gzip-on-asp-net-and-godaddy/ Optimizing Assets
  • 17. Web Site Optimization  Merge .js f iles  Minify scripts  For Minify http://compressor.ebiene.de/  http://javascriptcompressor.com/  Place scripts at the bottom of the page  Remove duplicates Javascript Optimizations
  • 18. Web Site Optimization Merge script files ….  You should aim for your JavaScripts to make as few requests as possible; ideally, this also means that you should have only one .js file. This task is as simple as taking all .js script files and placing them into a single file. Example : http://code.google.com/p/phpflair/ Javascript Optimizations
  • 19. Web Site Optimization  Merge and Minify  For Minify http://compressor.ebiene.de/  http://www.cleancss.com/  Place styles at the top of the page  Ban Expressions  #content {  left: expression(document.body.offsetWidth)  } CSS Optimizations
  • 20. Web Site Optimization #element-id{ background-image: url(image.png); background-position: -8px -8px; width: 16px; height: 16px; }
  • 21. Web Site Optimization  Firebug’s Net panel for Firefox, at http://www.getfirebug.com  YSlow, Yahoo!’s performance extension to Firebug, at http://developer.yahoo.com/yslow/  LiveHTTP Headers for Firefox, at http://livehttpheaders.mozdev.org/  Fiddler — for IE, but also a general-purpose packet sniffer, at http://www.fiddlertool.com/fiddler/  Web Inspector for Safari, at http://webkit.org/blog/?p=41 TOOLS FOR PERFORMANCE OPTIMIZATION