SlideShare a Scribd company logo
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
Ad

More Related Content

What's hot (20)

Advance SEO Training - Professional SEO Techniques
Advance SEO Training - Professional SEO TechniquesAdvance SEO Training - Professional SEO Techniques
Advance SEO Training - Professional SEO Techniques
Gaurang Trivedi
 
Web development | Derin Dolen
Web development | Derin Dolen Web development | Derin Dolen
Web development | Derin Dolen
Derin Dolen
 
Web development tool
Web development toolWeb development tool
Web development tool
Deep Bhavsar
 
The Website Redesign Process
The Website Redesign ProcessThe Website Redesign Process
The Website Redesign Process
Gary Schroeder
 
Search Engine Optimization - What's it about?
Search Engine Optimization -  What's it about?Search Engine Optimization -  What's it about?
Search Engine Optimization - What's it about?
Vũ Lê
 
Responsive web design ppt
Responsive web design pptResponsive web design ppt
Responsive web design ppt
NAWAZ KHAN
 
Web Development Presentation
Web Development PresentationWeb Development Presentation
Web Development Presentation
TurnToTech
 
Front end architecture
Front end architectureFront end architecture
Front end architecture
Remus Langu
 
Web Performance: 3 Stages to Success
Web Performance: 3 Stages to SuccessWeb Performance: 3 Stages to Success
Web Performance: 3 Stages to Success
Austin Gil
 
On page SEO
On page SEOOn page SEO
On page SEO
Animon2019
 
Intro to HTML and CSS basics
Intro to HTML and CSS basicsIntro to HTML and CSS basics
Intro to HTML and CSS basics
Eliran Eliassy
 
Ppt on Website Planning
Ppt on Website PlanningPpt on Website Planning
Ppt on Website Planning
Om Prakash
 
Web Development on Web Project Presentation
Web Development on Web Project PresentationWeb Development on Web Project Presentation
Web Development on Web Project Presentation
Milind Gokhale
 
Web Designing
Web Designing Web Designing
Web Designing
BALUJAINSTITUTE
 
Web Development
Web DevelopmentWeb Development
Web Development
Lena Petsenchuk
 
Web Site Design Principles
Web Site Design PrinciplesWeb Site Design Principles
Web Site Design Principles
Mukesh Tekwani
 
On-Site SEO Audit Example
On-Site SEO Audit ExampleOn-Site SEO Audit Example
On-Site SEO Audit Example
James Allen
 
Keyword Research Presentation
Keyword Research PresentationKeyword Research Presentation
Keyword Research Presentation
Rex Freiberger
 
Seo onpage & offpage
Seo onpage & offpageSeo onpage & offpage
Seo onpage & offpage
John Yadav
 
Html & Css presentation
Html  & Css presentation Html  & Css presentation
Html & Css presentation
joilrahat
 
Advance SEO Training - Professional SEO Techniques
Advance SEO Training - Professional SEO TechniquesAdvance SEO Training - Professional SEO Techniques
Advance SEO Training - Professional SEO Techniques
Gaurang Trivedi
 
Web development | Derin Dolen
Web development | Derin Dolen Web development | Derin Dolen
Web development | Derin Dolen
Derin Dolen
 
Web development tool
Web development toolWeb development tool
Web development tool
Deep Bhavsar
 
The Website Redesign Process
The Website Redesign ProcessThe Website Redesign Process
The Website Redesign Process
Gary Schroeder
 
Search Engine Optimization - What's it about?
Search Engine Optimization -  What's it about?Search Engine Optimization -  What's it about?
Search Engine Optimization - What's it about?
Vũ Lê
 
Responsive web design ppt
Responsive web design pptResponsive web design ppt
Responsive web design ppt
NAWAZ KHAN
 
Web Development Presentation
Web Development PresentationWeb Development Presentation
Web Development Presentation
TurnToTech
 
Front end architecture
Front end architectureFront end architecture
Front end architecture
Remus Langu
 
Web Performance: 3 Stages to Success
Web Performance: 3 Stages to SuccessWeb Performance: 3 Stages to Success
Web Performance: 3 Stages to Success
Austin Gil
 
Intro to HTML and CSS basics
Intro to HTML and CSS basicsIntro to HTML and CSS basics
Intro to HTML and CSS basics
Eliran Eliassy
 
Ppt on Website Planning
Ppt on Website PlanningPpt on Website Planning
Ppt on Website Planning
Om Prakash
 
Web Development on Web Project Presentation
Web Development on Web Project PresentationWeb Development on Web Project Presentation
Web Development on Web Project Presentation
Milind Gokhale
 
Web Site Design Principles
Web Site Design PrinciplesWeb Site Design Principles
Web Site Design Principles
Mukesh Tekwani
 
On-Site SEO Audit Example
On-Site SEO Audit ExampleOn-Site SEO Audit Example
On-Site SEO Audit Example
James Allen
 
Keyword Research Presentation
Keyword Research PresentationKeyword Research Presentation
Keyword Research Presentation
Rex Freiberger
 
Seo onpage & offpage
Seo onpage & offpageSeo onpage & offpage
Seo onpage & offpage
John Yadav
 
Html & Css presentation
Html  & Css presentation Html  & Css presentation
Html & Css presentation
joilrahat
 

Viewers also liked (20)

Html5 History-API
Html5 History-APIHtml5 History-API
Html5 History-API
Mindfire Solutions
 
Load testing
Load testingLoad testing
Load testing
Mindfire Solutions
 
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
Markus Zapke-Gründemann
 
Digesting jQuery
Digesting jQueryDigesting jQuery
Digesting jQuery
Mindfire Solutions
 
Rabbitmq & Postgresql
Rabbitmq & PostgresqlRabbitmq & Postgresql
Rabbitmq & Postgresql
Lucio 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.contrib
Tzu-ping Chung
 
PyClab.__init__(self)
PyClab.__init__(self)PyClab.__init__(self)
PyClab.__init__(self)
Tzu-ping Chung
 
2 × 3 = 6
2 × 3 = 62 × 3 = 6
2 × 3 = 6
Tzu-ping Chung
 
Django e il Rap Elia Contini
Django e il Rap Elia ContiniDjango e il Rap Elia Contini
Django e il Rap Elia Contini
WEBdeBS
 
라이트닝 토크 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 deadlines
Markus Zapke-Gründemann
 
Bottle - Python Web Microframework
Bottle - Python Web MicroframeworkBottle - Python Web Microframework
Bottle - Python Web Microframework
Markus Zapke-Gründemann
 
NoSql Day - Apertura
NoSql Day - AperturaNoSql Day - Apertura
NoSql Day - Apertura
WEBdeBS
 
Django mongodb -djangoday_
Django mongodb -djangoday_Django mongodb -djangoday_
Django mongodb -djangoday_
WEBdeBS
 
Vim for Mere Mortals
Vim for Mere MortalsVim for Mere Mortals
Vim for Mere Mortals
Clayton Parker
 
Django-Queryset
Django-QuerysetDjango-Queryset
Django-Queryset
Mindfire Solutions
 
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
Jiho Lee
 
User-centered open source
User-centered open sourceUser-centered open source
User-centered open source
Jacqueline Kazil
 
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
Markus Zapke-Gründemann
 
Rabbitmq & Postgresql
Rabbitmq & PostgresqlRabbitmq & Postgresql
Rabbitmq & Postgresql
Lucio 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.contrib
Tzu-ping Chung
 
Django e il Rap Elia Contini
Django e il Rap Elia ContiniDjango e il Rap Elia Contini
Django e il Rap Elia Contini
WEBdeBS
 
라이트닝 토크 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 deadlines
Markus Zapke-Gründemann
 
NoSql Day - Apertura
NoSql Day - AperturaNoSql Day - Apertura
NoSql Day - Apertura
WEBdeBS
 
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 python
Jiho Lee
 
Ad

Similar to Website optimization (20)

Frontend performance
Frontend performanceFrontend performance
Frontend performance
sacred 8
 
Web site loading time optimization
Web site loading time optimizationWeb site loading time optimization
Web site loading time optimization
Damith Kothalawala
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax Applications
Siarhei Barysiuk
 
23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress
Zero Point Development
 
DrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingDrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizing
Ashok Modi
 
Speed!
Speed!Speed!
Speed!
Rafael Corral
 
Joomla Content Delivery Networks
Joomla Content Delivery NetworksJoomla Content Delivery Networks
Joomla Content Delivery Networks
Mike Carson
 
WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019
Anam Ahmed
 
Caching 101
Caching 101Caching 101
Caching 101
Andy Melichar
 
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
mdc11
 
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
Bastian 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 WordPress
Josh 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 speed
Andy Kucharski
 
Drupal Frontend Performance and Scalability
Drupal Frontend Performance and ScalabilityDrupal Frontend Performance and Scalability
Drupal Frontend Performance and Scalability
Ashok Modi
 
Drupal performance optimization Best Practices
Drupal performance optimization Best PracticesDrupal performance optimization Best Practices
Drupal performance optimization Best Practices
Ratnesh 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 Site
MarkupBox
 
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
JoomlaDay Australia
 
wordpress-performance-presentation
wordpress-performance-presentationwordpress-performance-presentation
wordpress-performance-presentation
Arun Janarthanan
 
Html Optimization for SEO
Html Optimization for SEOHtml Optimization for SEO
Html Optimization for SEO
S. Ernest Paul ✪
 
Frontend performance
Frontend performanceFrontend performance
Frontend performance
sacred 8
 
Web site loading time optimization
Web site loading time optimizationWeb site loading time optimization
Web site loading time optimization
Damith Kothalawala
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax Applications
Siarhei Barysiuk
 
DrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingDrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizing
Ashok Modi
 
Joomla Content Delivery Networks
Joomla Content Delivery NetworksJoomla Content Delivery Networks
Joomla Content Delivery Networks
Mike Carson
 
WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019
Anam 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 saving
mdc11
 
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
Bastian 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 WordPress
Josh 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 speed
Andy Kucharski
 
Drupal Frontend Performance and Scalability
Drupal Frontend Performance and ScalabilityDrupal Frontend Performance and Scalability
Drupal Frontend Performance and Scalability
Ashok Modi
 
Drupal performance optimization Best Practices
Drupal performance optimization Best PracticesDrupal performance optimization Best Practices
Drupal performance optimization Best Practices
Ratnesh 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 Site
MarkupBox
 
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
JoomlaDay Australia
 
wordpress-performance-presentation
wordpress-performance-presentationwordpress-performance-presentation
wordpress-performance-presentation
Arun Janarthanan
 
Ad

More from Mindfire Solutions (20)

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

Recently uploaded (20)

ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 

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