SlideShare uma empresa Scribd logo
1 de 21
Baixar para ler 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

Mais conteúdo relacionado

Mais procurados

What is SEO | Type of seo | Technique of seo | SEO PPT
What is SEO | Type of seo | Technique of seo | SEO PPTWhat is SEO | Type of seo | Technique of seo | SEO PPT
What is SEO | Type of seo | Technique of seo | SEO PPTKhalid Shaikh
 
SEO, Search Engine Ranking Position (SERP) Report
SEO, Search Engine Ranking Position (SERP) ReportSEO, Search Engine Ranking Position (SERP) Report
SEO, Search Engine Ranking Position (SERP) ReportKevin James
 
Search Engine Optimization
Search Engine OptimizationSearch Engine Optimization
Search Engine OptimizationHazem Torab
 
Website Analysis Report
Website Analysis ReportWebsite Analysis Report
Website Analysis ReportAuroIN
 
Do follow and no-follow link
Do follow and no-follow linkDo follow and no-follow link
Do follow and no-follow linkAbhishek Mitra
 
On page off-page seo points
On page off-page seo pointsOn page off-page seo points
On page off-page seo pointspawan saroj
 
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
 
Importance of Backlinks In SEO
Importance of Backlinks In SEOImportance of Backlinks In SEO
Importance of Backlinks In SEOAarav Infotech
 
SEO Audit Report Format
SEO Audit Report Format SEO Audit Report Format
SEO Audit Report Format Pankaj Bisht
 
A Practical Guide to Keyword Research
A Practical Guide to Keyword ResearchA Practical Guide to Keyword Research
A Practical Guide to Keyword ResearchRebecca Gill
 

Mais procurados (20)

Seo checklist
Seo checklistSeo checklist
Seo checklist
 
What is SEO | Type of seo | Technique of seo | SEO PPT
What is SEO | Type of seo | Technique of seo | SEO PPTWhat is SEO | Type of seo | Technique of seo | SEO PPT
What is SEO | Type of seo | Technique of seo | SEO PPT
 
Introduction to Search Engine Optimization
Introduction to Search Engine OptimizationIntroduction to Search Engine Optimization
Introduction to Search Engine Optimization
 
SEO, Search Engine Ranking Position (SERP) Report
SEO, Search Engine Ranking Position (SERP) ReportSEO, Search Engine Ranking Position (SERP) Report
SEO, Search Engine Ranking Position (SERP) Report
 
OFF PAGE SEO
OFF PAGE SEOOFF PAGE SEO
OFF PAGE SEO
 
On page SEO
On page SEOOn page SEO
On page SEO
 
Technical Seo
Technical SeoTechnical Seo
Technical Seo
 
Off page seo
Off page seo Off page seo
Off page seo
 
Search Engine Optimization
Search Engine OptimizationSearch Engine Optimization
Search Engine Optimization
 
Website Analysis Report
Website Analysis ReportWebsite Analysis Report
Website Analysis Report
 
Do follow and no-follow link
Do follow and no-follow linkDo follow and no-follow link
Do follow and no-follow link
 
On page off-page seo points
On page off-page seo pointsOn page off-page seo points
On page off-page seo points
 
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
 
Website analysis Sample Report
Website analysis  Sample ReportWebsite analysis  Sample Report
Website analysis Sample Report
 
Importance of Backlinks In SEO
Importance of Backlinks In SEOImportance of Backlinks In SEO
Importance of Backlinks In SEO
 
SEO Audit Report Format
SEO Audit Report Format SEO Audit Report Format
SEO Audit Report Format
 
Search Engine Optimization ppt
Search Engine Optimization pptSearch Engine Optimization ppt
Search Engine Optimization ppt
 
A Practical Guide to Keyword Research
A Practical Guide to Keyword ResearchA Practical Guide to Keyword Research
A Practical Guide to Keyword Research
 
On Page SEO
On Page SEOOn Page SEO
On Page SEO
 
SEO
SEOSEO
SEO
 

Destaque

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
 

Destaque (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
 

Semelhante a 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
 

Semelhante a 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
 

Mais de 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
 

Último

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
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
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
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
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
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
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 

Último (20)

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
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
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
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
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
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
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
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?
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 

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