SlideShare uma empresa Scribd logo
1 de 17
CIGNEX Datamatics Confidential www.cignex.com
Web Performance Tuning in Front-end Perspective
Ver : 1.0
Name: Sendhil Kumar K
Title: Web Performance Tuning
in Front-end Perspective
CIGNEX Datamatics Confidential www.cignex.com
• 80% of the end-user response time is spent on the front-end. Most of this time is tied
up in downloading all the components in the page: images, stylesheets, scripts, Flash,
etc.
2
Best Practices for Speeding Up Your Web Site
CIGNEX Datamatics Confidential www.cignex.com
Why is speed important?
• Offers a good user experience
• No broken functionality
• Doesn't make one feel like they are living in the 90s
CIGNEX Datamatics Confidential www.cignex.com
Cross-platform
CIGNEX Datamatics Confidential www.cignex.com
JS Minification
/**
* This, friends, is a very important function.
*/
function examplefunction(){
var be = true;
if(be){
confirm("You sure about that?");
}else if(!be){
Confirm("Apparently not.")
}
}
function examplefunction(){var be=true;if(be)
{confirm("You sure about that?");}else if(!be)
{Confirm("Apparently not.")}};
• Reduce the size of the Javascript files.
• Reduce the total response sizes.
• Reduced bandwidth significantly
Original size: 205 Minified size: 121 41%
CIGNEX Datamatics Confidential www.cignex.com
JS Obfuscation (harder to understand)
function exampleFunction(){
Var aLongerThanNecessaryVariableName =
true;
if(aLongerThanNecessaryVariableName){
confirm("You sure about that?");
}else if(!aLongerThanNecessaryVariableName){
confirm("Apparently not.");
}
}
function exampleFunction(){
Var a = true;
if(a){
confirm("You sure about that?");
}else if(!a){
confirm("Apparently not.");
}
}
• Reduce the lenght of variables names
• Be careful the obfuscation method (e.g., eval cause performance degradation)
• Be careful the conflicts.
Original size: 238 Obfuscation size: 145 39%
CIGNEX Datamatics Confidential www.cignex.com
Combined (css, js)
CSS
<link href="./css/custom.css" rel="stylesheet" type="text/css">
<link href="./css/custom_responsive.css" rel="stylesheet" type="text/css">
JS
<script src="./js/custom.js"></script>
<script src="./js/custom_responsive.js"></script>
<link href="./css/combination.css" rel="stylesheet" type="text/css">
<script src="./js/combination.js"></script>
• Reduce the HTTP requrest.
• Reduce the size and load fast
CIGNEX Datamatics Confidential www.cignex.com
<head>
<link href="./css/custom.css" rel="stylesheet" type="text/css">
<link href="./css/custom_responsive.css" rel="stylesheet" type="text/css">
</head>
<body>
..
..
<script src="./js/custom.js" type="text/javascript"></script>
<script src="./js/custom_responsive.js" type="text/javascript"></script>
</body>
Source Order
<head>
<script src="./js/custom.js"></script>
<script src="./js/custom_responsive.js"></script>
<link href="./css/custom.css" rel="stylesheet" type="text/css">
<link href="./css/custom_responsive.css" rel="stylesheet"
type="text/css">
</head>
<body>
..
..
</body>
• Keep CSS at Top
• Keep JavaScripts at the Bottom
• Drop all inline styles if possible and don't use browser specific CSS effects (esp. IE)
• Use <link> to include stylesheets
- @import MUST preceded all other rules
- @import may cause blank white screen phenomenon (in IE)
CIGNEX Datamatics Confidential www.cignex.com
• CSS Sprites: Combine N icons into 1 bigger image.
– Reduce N requests into 1 requrest.
– Be careful of the arrangement of the icons
– Tool: http://www.tw.spritegen.website-performance.org/
http://csssprites.com/
• Minimize, cut snip, chop
– Minimize DOM elements. Slows donw JS
– Iframes are heavy and block onload event
– Minimize 3rd party script. See if you load those asynchronously
– Reduce the cookie size.
– Optimize images, use PNG instead of GIF.
– Using appropriate image format and remove redundant chunks in the image files.
– PNG8 (256 color) is a good choice.
– Reduce JPG quality. Tools like jpgtran, pngcrush, optipng will help
– Avoid image scaling
9
Make Fewer Requests
CIGNEX Datamatics Confidential www.cignex.com
– Use JSON in AJAX requests
– Use GET in Ajax requests
– Prefer CSS over JSON
– Font optimizing
– Lazy load for Images
– Avoid Flash files
– Mobile-specific optimisations
Make Fewer Requests ( Minimize, cut snip, chop...)
CIGNEX Datamatics Confidential www.cignex.com
Browser-Based Tools
CIGNEX Datamatics Confidential www.cignex.com
YSlow (Add-on)
http://developer.yahoo.com/yslow/
• YSlow analyzes web page performance by examining all the components on the
page, including components dynamically created by using JavaScript. It measures the
page's performance and offers suggestions for improvement.
CIGNEX Datamatics Confidential www.cignex.com
Page Speed
• Useful to detect our website performance
• Gives two scores: desktop and mobile
• LIsts everything we can improve
https://developers.google.com/speed/pagespeed/?csw=1
Firefox Add-on
CIGNEX Datamatics Confidential www.cignex.com
Other tools
• FireBug (Net tab)
• Firecookie (Firecookie is an extension for Firebug that makes possible to view and manage cookies in
your browser)
• Live HTTP Headers (View HTTP headers of a page and while browsing.)
• Chrome, Safari, IE developer tools
CIGNEX Datamatics Confidential www.cignex.com
List of best practices
CIGNEX Datamatics Confidential www.cignex.com
Simplifying CSS Selectors
• CSS selector policy: Rightmost-First
• Tips:
– Avoid * selector
– Don’t qualify ID/CSS selectors
– Specific rules
– Avoid descendant selectors
– Avoid Tag > Child selectors
– Rely on Inheritance
CIGNEX Datamatics Confidential www.cignex.com
 http://developer.yahoo.com/performance/rules.html - Yahoo
 http://developer.mozilla.org/en/docs/Writing_Efficient_CSS - CSS Guidelines
 http://www.alistapart.com/articles/sprites - CSS Sprites
 http://www.javascripttoolbox.com/bestpractices/ - Javascript best practices
 http://www.getfirebug.com/ - FireBug
 http://www.julienlecomte.net/ - A nice blog
 http://stevesouders.com/cuzillion/ - Place scripts & other resources tester
 http://quirksmode.org/
 Other references: Jquery, GWT, YUI, Ajaxian
 Future - Ajax tied up with desktop web, other gadgets.
 Douglaus crockford - Yahoo videos about Javascript, DOM, Advanced JS
 Google I/O videos about web site performance tuning.
Referances

Mais conteúdo relacionado

Mais procurados

NextJS, A JavaScript Framework for building next generation SPA
NextJS, A JavaScript Framework for building next generation SPA  NextJS, A JavaScript Framework for building next generation SPA
NextJS, A JavaScript Framework for building next generation SPA Pramendra Gupta
 
Client Side Performance @ Xero
Client Side Performance @ XeroClient Side Performance @ Xero
Client Side Performance @ XeroCraig Walker
 
Building fast aspnet websites
Building fast aspnet websitesBuilding fast aspnet websites
Building fast aspnet websitesMaarten Louage
 
Optimizing WordPress for Speed and Conversions
Optimizing WordPress for Speed and ConversionsOptimizing WordPress for Speed and Conversions
Optimizing WordPress for Speed and ConversionsAffiliate Summit
 
jQuery 1.9 and 2.0 - Present and Future
jQuery 1.9 and 2.0 - Present and FuturejQuery 1.9 and 2.0 - Present and Future
jQuery 1.9 and 2.0 - Present and FutureRichard Worth
 
Progressive Web Apps: o melhor da Web appficada
Progressive Web Apps: o melhor da Web appficadaProgressive Web Apps: o melhor da Web appficada
Progressive Web Apps: o melhor da Web appficadaCaelum
 
DeepCrawl Webinar: Performing SEO on the Edge
DeepCrawl Webinar: Performing SEO on the EdgeDeepCrawl Webinar: Performing SEO on the Edge
DeepCrawl Webinar: Performing SEO on the EdgeDan Taylor
 
Next.js in production by Jasdeep Lalli
Next.js in production by Jasdeep Lalli Next.js in production by Jasdeep Lalli
Next.js in production by Jasdeep Lalli React London 2017
 
How webpage loading takes place?
How webpage loading takes place?How webpage loading takes place?
How webpage loading takes place?Abhishek Mitra
 
Performance Test Analysis- Hotels
Performance Test Analysis- HotelsPerformance Test Analysis- Hotels
Performance Test Analysis- Hotelsyassine Alozade
 
Client side performance analysis
Client side performance analysisClient side performance analysis
Client side performance analysisTsimafei Avilin
 
10 things to do to speed up your site
10 things to do to speed up your site10 things to do to speed up your site
10 things to do to speed up your siteIndigo Tree Digital
 
Responsive design in plone
Responsive design in ploneResponsive design in plone
Responsive design in ploneAlin Voinea
 
BrightonSEO 2019 - Edge SEO - Using CDNs To Perform SEO On The Edge
BrightonSEO 2019 - Edge SEO - Using CDNs To Perform SEO On The EdgeBrightonSEO 2019 - Edge SEO - Using CDNs To Perform SEO On The Edge
BrightonSEO 2019 - Edge SEO - Using CDNs To Perform SEO On The EdgeDan Taylor
 
Web Performance: 3 Stages to Success
Web Performance: 3 Stages to SuccessWeb Performance: 3 Stages to Success
Web Performance: 3 Stages to SuccessAustin Gil
 
Effectively Monitoring Client-Side Performance
Effectively Monitoring Client-Side PerformanceEffectively Monitoring Client-Side Performance
Effectively Monitoring Client-Side PerformanceAndrew Rota
 

Mais procurados (20)

NextJS, A JavaScript Framework for building next generation SPA
NextJS, A JavaScript Framework for building next generation SPA  NextJS, A JavaScript Framework for building next generation SPA
NextJS, A JavaScript Framework for building next generation SPA
 
Client Side Performance @ Xero
Client Side Performance @ XeroClient Side Performance @ Xero
Client Side Performance @ Xero
 
AEM responsive
AEM responsiveAEM responsive
AEM responsive
 
Building fast aspnet websites
Building fast aspnet websitesBuilding fast aspnet websites
Building fast aspnet websites
 
Optimizing WordPress for Speed and Conversions
Optimizing WordPress for Speed and ConversionsOptimizing WordPress for Speed and Conversions
Optimizing WordPress for Speed and Conversions
 
jQuery 1.9 and 2.0 - Present and Future
jQuery 1.9 and 2.0 - Present and FuturejQuery 1.9 and 2.0 - Present and Future
jQuery 1.9 and 2.0 - Present and Future
 
Progressive Web Apps: o melhor da Web appficada
Progressive Web Apps: o melhor da Web appficadaProgressive Web Apps: o melhor da Web appficada
Progressive Web Apps: o melhor da Web appficada
 
DeepCrawl Webinar: Performing SEO on the Edge
DeepCrawl Webinar: Performing SEO on the EdgeDeepCrawl Webinar: Performing SEO on the Edge
DeepCrawl Webinar: Performing SEO on the Edge
 
Next.js in production by Jasdeep Lalli
Next.js in production by Jasdeep Lalli Next.js in production by Jasdeep Lalli
Next.js in production by Jasdeep Lalli
 
How webpage loading takes place?
How webpage loading takes place?How webpage loading takes place?
How webpage loading takes place?
 
Performance Test Analysis- Hotels
Performance Test Analysis- HotelsPerformance Test Analysis- Hotels
Performance Test Analysis- Hotels
 
Client side performance analysis
Client side performance analysisClient side performance analysis
Client side performance analysis
 
Biwug
BiwugBiwug
Biwug
 
10 things to do to speed up your site
10 things to do to speed up your site10 things to do to speed up your site
10 things to do to speed up your site
 
Responsive design in plone
Responsive design in ploneResponsive design in plone
Responsive design in plone
 
Why AngularJs
Why AngularJsWhy AngularJs
Why AngularJs
 
BrightonSEO 2019 - Edge SEO - Using CDNs To Perform SEO On The Edge
BrightonSEO 2019 - Edge SEO - Using CDNs To Perform SEO On The EdgeBrightonSEO 2019 - Edge SEO - Using CDNs To Perform SEO On The Edge
BrightonSEO 2019 - Edge SEO - Using CDNs To Perform SEO On The Edge
 
Web Performance: 3 Stages to Success
Web Performance: 3 Stages to SuccessWeb Performance: 3 Stages to Success
Web Performance: 3 Stages to Success
 
Angular js
Angular jsAngular js
Angular js
 
Effectively Monitoring Client-Side Performance
Effectively Monitoring Client-Side PerformanceEffectively Monitoring Client-Side Performance
Effectively Monitoring Client-Side Performance
 

Destaque

Stats stif-transports-idf-janvier-2016-2
Stats stif-transports-idf-janvier-2016-2Stats stif-transports-idf-janvier-2016-2
Stats stif-transports-idf-janvier-2016-2Quoimaligne Idf
 
Front end performance optimization
Front end performance optimizationFront end performance optimization
Front end performance optimizationStevie T
 
Front end performance tip
Front end performance tipFront end performance tip
Front end performance tipSteve Yu
 
Building a High Performance WordPress Environment - WordCamp NYC 2010
Building a High Performance WordPress Environment - WordCamp NYC 2010Building a High Performance WordPress Environment - WordCamp NYC 2010
Building a High Performance WordPress Environment - WordCamp NYC 2010Matt Martz
 
London Web Performance Meetup: Performance for mortal companies
London Web Performance Meetup: Performance for mortal companiesLondon Web Performance Meetup: Performance for mortal companies
London Web Performance Meetup: Performance for mortal companiesStrangeloop
 

Destaque (8)

git
gitgit
git
 
Stats stif-transports-idf-janvier-2016-2
Stats stif-transports-idf-janvier-2016-2Stats stif-transports-idf-janvier-2016-2
Stats stif-transports-idf-janvier-2016-2
 
Front end performance optimization
Front end performance optimizationFront end performance optimization
Front end performance optimization
 
Front end performance tip
Front end performance tipFront end performance tip
Front end performance tip
 
Building a High Performance WordPress Environment - WordCamp NYC 2010
Building a High Performance WordPress Environment - WordCamp NYC 2010Building a High Performance WordPress Environment - WordCamp NYC 2010
Building a High Performance WordPress Environment - WordCamp NYC 2010
 
Front End Performance
Front End PerformanceFront End Performance
Front End Performance
 
London Web Performance Meetup: Performance for mortal companies
London Web Performance Meetup: Performance for mortal companiesLondon Web Performance Meetup: Performance for mortal companies
London Web Performance Meetup: Performance for mortal companies
 
Bootstrap with liferay
Bootstrap with liferayBootstrap with liferay
Bootstrap with liferay
 

Semelhante a Web performance tuning

The High Performance Web Application Lifecycle
The High Performance Web Application LifecycleThe High Performance Web Application Lifecycle
The High Performance Web Application LifecycleAlois Reitbauer
 
12 GoMeasure (sg and kl) - page speed light speed path to conversions - joh...
12   GoMeasure (sg and kl) - page speed light speed path to conversions - joh...12   GoMeasure (sg and kl) - page speed light speed path to conversions - joh...
12 GoMeasure (sg and kl) - page speed light speed path to conversions - joh...Vinoaj Vijeyakumaar
 
Build Better Responsive websites. Hrvoje Jurišić
Build Better Responsive websites. Hrvoje JurišićBuild Better Responsive websites. Hrvoje Jurišić
Build Better Responsive websites. Hrvoje JurišićMeetMagentoNY2014
 
Optimizing your WordPress website
Optimizing your WordPress websiteOptimizing your WordPress website
Optimizing your WordPress websitemwfordesigns
 
[convergese] Adaptive Images in Responsive Web Design
[convergese] Adaptive Images in Responsive Web Design[convergese] Adaptive Images in Responsive Web Design
[convergese] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
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
 
VizEx View HTML5 Workshop
VizEx View HTML5 WorkshopVizEx View HTML5 Workshop
VizEx View HTML5 WorkshopDavid Manock
 
Website Optimization How to Increase Page Performance and More
Website Optimization How to Increase Page Performance and More Website Optimization How to Increase Page Performance and More
Website Optimization How to Increase Page Performance and More Boundify
 
20 tips for website performance
20 tips for website performance20 tips for website performance
20 tips for website performanceAndrew Siemer
 
Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Timothy Fisher
 
SearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital Marketers
SearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital MarketersSearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital Marketers
SearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital MarketersDistilled
 
PrairieDevCon 2014 - Web Doesn't Mean Slow
PrairieDevCon 2014 -  Web Doesn't Mean SlowPrairieDevCon 2014 -  Web Doesn't Mean Slow
PrairieDevCon 2014 - Web Doesn't Mean Slowdmethvin
 
Developing High Performance Web Apps
Developing High Performance Web AppsDeveloping High Performance Web Apps
Developing High Performance Web AppsTimothy Fisher
 
JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizationsChris Love
 

Semelhante a Web performance tuning (20)

The High Performance Web Application Lifecycle
The High Performance Web Application LifecycleThe High Performance Web Application Lifecycle
The High Performance Web Application Lifecycle
 
12 GoMeasure (sg and kl) - page speed light speed path to conversions - joh...
12   GoMeasure (sg and kl) - page speed light speed path to conversions - joh...12   GoMeasure (sg and kl) - page speed light speed path to conversions - joh...
12 GoMeasure (sg and kl) - page speed light speed path to conversions - joh...
 
Presentation Tier optimizations
Presentation Tier optimizationsPresentation Tier optimizations
Presentation Tier optimizations
 
Build Better Responsive websites. Hrvoje Jurišić
Build Better Responsive websites. Hrvoje JurišićBuild Better Responsive websites. Hrvoje Jurišić
Build Better Responsive websites. Hrvoje Jurišić
 
Optimizing your WordPress website
Optimizing your WordPress websiteOptimizing your WordPress website
Optimizing your WordPress website
 
Modelling Web Performance Optimization - FFSUx
Modelling  Web Performance Optimization - FFSUxModelling  Web Performance Optimization - FFSUx
Modelling Web Performance Optimization - FFSUx
 
[convergese] Adaptive Images in Responsive Web Design
[convergese] Adaptive Images in Responsive Web Design[convergese] Adaptive Images in Responsive Web Design
[convergese] Adaptive Images in Responsive Web Design
 
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
 
VizEx View HTML5 Workshop
VizEx View HTML5 WorkshopVizEx View HTML5 Workshop
VizEx View HTML5 Workshop
 
VizEx View HTML5 Workshop
VizEx View HTML5 WorkshopVizEx View HTML5 Workshop
VizEx View HTML5 Workshop
 
Website Optimization How to Increase Page Performance and More
Website Optimization How to Increase Page Performance and More Website Optimization How to Increase Page Performance and More
Website Optimization How to Increase Page Performance and More
 
20 tips for website performance
20 tips for website performance20 tips for website performance
20 tips for website performance
 
Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011
 
SearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital Marketers
SearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital MarketersSearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital Marketers
SearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital Marketers
 
PrairieDevCon 2014 - Web Doesn't Mean Slow
PrairieDevCon 2014 -  Web Doesn't Mean SlowPrairieDevCon 2014 -  Web Doesn't Mean Slow
PrairieDevCon 2014 - Web Doesn't Mean Slow
 
performance.ppt
performance.pptperformance.ppt
performance.ppt
 
Developing High Performance Web Apps
Developing High Performance Web AppsDeveloping High Performance Web Apps
Developing High Performance Web Apps
 
JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizations
 
AspNetWhitePaper
AspNetWhitePaperAspNetWhitePaper
AspNetWhitePaper
 
AspNetWhitePaper
AspNetWhitePaperAspNetWhitePaper
AspNetWhitePaper
 

Último

Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.soniya singh
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girladitipandeya
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxellan12
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLimonikaupta
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...tanu pandey
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)Delhi Call girls
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)Damian Radcliffe
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Sheetaleventcompany
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...singhpriety023
 
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...Escorts Call Girls
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebJames Anderson
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Standkumarajju5765
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGAPNIC
 

Último (20)

Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
 
@9999965857 🫦 Sexy Desi Call Girls Laxmi Nagar 💓 High Profile Escorts Delhi 🫶
@9999965857 🫦 Sexy Desi Call Girls Laxmi Nagar 💓 High Profile Escorts Delhi 🫶@9999965857 🫦 Sexy Desi Call Girls Laxmi Nagar 💓 High Profile Escorts Delhi 🫶
@9999965857 🫦 Sexy Desi Call Girls Laxmi Nagar 💓 High Profile Escorts Delhi 🫶
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
 
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
 
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
 
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
 

Web performance tuning

  • 1. CIGNEX Datamatics Confidential www.cignex.com Web Performance Tuning in Front-end Perspective Ver : 1.0 Name: Sendhil Kumar K Title: Web Performance Tuning in Front-end Perspective
  • 2. CIGNEX Datamatics Confidential www.cignex.com • 80% of the end-user response time is spent on the front-end. Most of this time is tied up in downloading all the components in the page: images, stylesheets, scripts, Flash, etc. 2 Best Practices for Speeding Up Your Web Site
  • 3. CIGNEX Datamatics Confidential www.cignex.com Why is speed important? • Offers a good user experience • No broken functionality • Doesn't make one feel like they are living in the 90s
  • 4. CIGNEX Datamatics Confidential www.cignex.com Cross-platform
  • 5. CIGNEX Datamatics Confidential www.cignex.com JS Minification /** * This, friends, is a very important function. */ function examplefunction(){ var be = true; if(be){ confirm("You sure about that?"); }else if(!be){ Confirm("Apparently not.") } } function examplefunction(){var be=true;if(be) {confirm("You sure about that?");}else if(!be) {Confirm("Apparently not.")}}; • Reduce the size of the Javascript files. • Reduce the total response sizes. • Reduced bandwidth significantly Original size: 205 Minified size: 121 41%
  • 6. CIGNEX Datamatics Confidential www.cignex.com JS Obfuscation (harder to understand) function exampleFunction(){ Var aLongerThanNecessaryVariableName = true; if(aLongerThanNecessaryVariableName){ confirm("You sure about that?"); }else if(!aLongerThanNecessaryVariableName){ confirm("Apparently not."); } } function exampleFunction(){ Var a = true; if(a){ confirm("You sure about that?"); }else if(!a){ confirm("Apparently not."); } } • Reduce the lenght of variables names • Be careful the obfuscation method (e.g., eval cause performance degradation) • Be careful the conflicts. Original size: 238 Obfuscation size: 145 39%
  • 7. CIGNEX Datamatics Confidential www.cignex.com Combined (css, js) CSS <link href="./css/custom.css" rel="stylesheet" type="text/css"> <link href="./css/custom_responsive.css" rel="stylesheet" type="text/css"> JS <script src="./js/custom.js"></script> <script src="./js/custom_responsive.js"></script> <link href="./css/combination.css" rel="stylesheet" type="text/css"> <script src="./js/combination.js"></script> • Reduce the HTTP requrest. • Reduce the size and load fast
  • 8. CIGNEX Datamatics Confidential www.cignex.com <head> <link href="./css/custom.css" rel="stylesheet" type="text/css"> <link href="./css/custom_responsive.css" rel="stylesheet" type="text/css"> </head> <body> .. .. <script src="./js/custom.js" type="text/javascript"></script> <script src="./js/custom_responsive.js" type="text/javascript"></script> </body> Source Order <head> <script src="./js/custom.js"></script> <script src="./js/custom_responsive.js"></script> <link href="./css/custom.css" rel="stylesheet" type="text/css"> <link href="./css/custom_responsive.css" rel="stylesheet" type="text/css"> </head> <body> .. .. </body> • Keep CSS at Top • Keep JavaScripts at the Bottom • Drop all inline styles if possible and don't use browser specific CSS effects (esp. IE) • Use <link> to include stylesheets - @import MUST preceded all other rules - @import may cause blank white screen phenomenon (in IE)
  • 9. CIGNEX Datamatics Confidential www.cignex.com • CSS Sprites: Combine N icons into 1 bigger image. – Reduce N requests into 1 requrest. – Be careful of the arrangement of the icons – Tool: http://www.tw.spritegen.website-performance.org/ http://csssprites.com/ • Minimize, cut snip, chop – Minimize DOM elements. Slows donw JS – Iframes are heavy and block onload event – Minimize 3rd party script. See if you load those asynchronously – Reduce the cookie size. – Optimize images, use PNG instead of GIF. – Using appropriate image format and remove redundant chunks in the image files. – PNG8 (256 color) is a good choice. – Reduce JPG quality. Tools like jpgtran, pngcrush, optipng will help – Avoid image scaling 9 Make Fewer Requests
  • 10. CIGNEX Datamatics Confidential www.cignex.com – Use JSON in AJAX requests – Use GET in Ajax requests – Prefer CSS over JSON – Font optimizing – Lazy load for Images – Avoid Flash files – Mobile-specific optimisations Make Fewer Requests ( Minimize, cut snip, chop...)
  • 11. CIGNEX Datamatics Confidential www.cignex.com Browser-Based Tools
  • 12. CIGNEX Datamatics Confidential www.cignex.com YSlow (Add-on) http://developer.yahoo.com/yslow/ • YSlow analyzes web page performance by examining all the components on the page, including components dynamically created by using JavaScript. It measures the page's performance and offers suggestions for improvement.
  • 13. CIGNEX Datamatics Confidential www.cignex.com Page Speed • Useful to detect our website performance • Gives two scores: desktop and mobile • LIsts everything we can improve https://developers.google.com/speed/pagespeed/?csw=1 Firefox Add-on
  • 14. CIGNEX Datamatics Confidential www.cignex.com Other tools • FireBug (Net tab) • Firecookie (Firecookie is an extension for Firebug that makes possible to view and manage cookies in your browser) • Live HTTP Headers (View HTTP headers of a page and while browsing.) • Chrome, Safari, IE developer tools
  • 15. CIGNEX Datamatics Confidential www.cignex.com List of best practices
  • 16. CIGNEX Datamatics Confidential www.cignex.com Simplifying CSS Selectors • CSS selector policy: Rightmost-First • Tips: – Avoid * selector – Don’t qualify ID/CSS selectors – Specific rules – Avoid descendant selectors – Avoid Tag > Child selectors – Rely on Inheritance
  • 17. CIGNEX Datamatics Confidential www.cignex.com  http://developer.yahoo.com/performance/rules.html - Yahoo  http://developer.mozilla.org/en/docs/Writing_Efficient_CSS - CSS Guidelines  http://www.alistapart.com/articles/sprites - CSS Sprites  http://www.javascripttoolbox.com/bestpractices/ - Javascript best practices  http://www.getfirebug.com/ - FireBug  http://www.julienlecomte.net/ - A nice blog  http://stevesouders.com/cuzillion/ - Place scripts & other resources tester  http://quirksmode.org/  Other references: Jquery, GWT, YUI, Ajaxian  Future - Ajax tied up with desktop web, other gadgets.  Douglaus crockford - Yahoo videos about Javascript, DOM, Advanced JS  Google I/O videos about web site performance tuning. Referances