Web Front End Performance
Upcoming SlideShare
Loading in...5
×
 

Web Front End Performance

on

  • 1,611 views

This is an older session,

This is an older session,

Statistics

Views

Total Views
1,611
Views on SlideShare
1,609
Embed Views
2

Actions

Likes
2
Downloads
17
Comments
0

1 Embed 2

http://www.techgig.com 2

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Entity Tags (ETags) are commonly used in Web applications to effectively leverage the power of using web farms, which is a non-fancy term for HTTP/S load balancing.  In web farms, a common practice is to set what is called ETags as it helps enhance performance in web farm scenarios.  ETags is controlled in IIS by a metabase property (ETAG_CHANGENUMBER) and this value is sent back to clients via response headers as instructed by the HTTP RFC 2616. 

Web Front End Performance Web Front End Performance Presentation Transcript

  • ASP.NET Performance Tips
    GettingThings Right on the Client
    Chris Love
    http://ProfessionalASPNET.com
    Copyright Extreme Web Works - http://ProfessionalASPNET.com
  • ASP.NET Performance Tips on the Server I
    ASP.NET Performance Tips on the Server II
    ASP.NET Performance Tips on the Client-Side
    Copyright Extreme Web Works - http://ProfessionalASPNET.com
  • High Performance Web Sites
    Essential Knowledge for
    Front-End Engineers
    Steve Souders
    http://amzn.to/gwf9pG
    http://amzn.to/gudayQ
    http://developer.yahoo.com/performance/rules.html
    Copyright Extreme Web Works - http://ProfessionalASPNET.com
  • Front-End Performance Tools
    • FireBug and YSlow
    • http://GetFireBug.com
    • http://developer.yahoo.com/yslow/
    • Fiddler
    • http://FiddlerTools.com
    • Web Development Helper
    • http://projects.nikhilk.net/Projects/WebDevHelper.aspx
    Copyright Extreme Web Works - http://ProfessionalASPNET.com
  • Front-End Performance Rules
    Make Fewer HTTP Requests
    Use a Content Delivery Network
    Add an Expires Header *
    Compress Content *
    StyleeSheets On Top *
    Scripts at Bottom *
    Avoid CSS Expressions
    Make JavaScript and CSS External *
    Reduce DNS Lookups
    Minify JavaScript *
    Avoid Redirects *
    Remove Duplicate Scripts *
    Configure Etags
    Make AJAX Cacheable *
    Copyright Extreme Web Works - http://ProfessionalASPNET.com
  • Make Fewer HTTP Requests
    • Each Request Adds More Overhead
    • Avoid Slicing Images that are not Reused
    • Image Maps
    • CSS Sprites
    • Inline Images
    • Combine Scripts and CSS
    Copyright Extreme Web Works - http://ProfessionalASPNET.com
    • Use a Content Delivery Network
    • More Geographically Dispersed
    • Not really practical for most sites.
    • Can see drastic response time savings
    • Do not compare tests against in house lab results
    Copyright Extreme Web Works - http://ProfessionalASPNET.com
    • Configure Etags
    Mechanism for Servers and Browsers to
    Communicate about Cache Validation.
    Provide a way to know if Browser Cache matches
    what is on the server.
    RFC 2616
    Sends a 304 Response instead of 200
    IIS 6.0 & Service Pack 1 (slipstream)
    IIS 7 can be integrated with IIS 6 Farms
    Set ETAG_CHANGENUMBER to 0
    Best Idea - Just Remove them!
    Copyright Extreme Web Works - http://ProfessionalASPNET.com
  • Avoid CSS Expressions
    • Specific to IE 5+
    • Constantly being Reevaluated
    • Use JavaScript Functions to change the Style
    • Use One-Time Expressions
    Copyright Extreme Web Works - http://ProfessionalASPNET.com
  • Reduce DNS Lookups
    • DNS Caching – How does DNS work?
    • Find the Fine Point between Parallel Downloads and DNS lookups
    Copyright Extreme Web Works - http://ProfessionalASPNET.com
  • Compress Content
    • Reduces Content being sent over the wire
    • Gzip, Deflate
    • Increases Processer Demand on both ends
    • IIS 6 and IIS 7
    • http://technet2.microsoft.com/windowsserver2008/en/library/60f3fa55-f005-496e-9d2f-cc4fc2732fce1033.mspx?mfr=true
    • Blowry
    • Various ISAPI Filters
    Copyright Extreme Web Works - http://ProfessionalASPNET.com
  • Add an Expires Header
    • Primes the Cache
    • For more than just images
    <%@ OutputCache Duration="60" VaryByParam="None" %>
    Response.Cache.SetExpires(DateTime.Now.AddSeconds(60)) Response.Cache.SetCacheability(HttpCacheability.Public)
    <%@ OutputCache Duration="60" Location="Downstream" VaryByParam="None" %>
    Copyright Extreme Web Works - http://ProfessionalASPNET.com
  • StyleeSheets On Top
    • Progressive Rendering
    Copyright Extreme Web Works - http://ProfessionalASPNET.com
  • Make JavaScript and CSS External
    <link rel="stylesheet" href=“Main.css”>
    <script src=“Meta.js "></script>
    Copyright Extreme Web Works - http://ProfessionalASPNET.com
  • Scripts at Bottom
    • Yes!!! This Really Works!
    • Defers Loading Client-Side Logic till after HTML
    • Loading JavaScript is a Blocking Call (Everything waits for it to finish)
    <asp:ScriptManager ID="ScriptManager1" runat="server" LoadScriptsBeforeUI="false">
    </asp:ScriptManager>
    Copyright Extreme Web Works - http://ProfessionalASPNET.com
  • Minify JavaScript
    • Remove Unnecessary Characters from JS Files
    • JSMin - http://www.crockford.com/javascript/jsmin.html
    • DoJo Compressor - http://dojotoolkit.org/docs/shrinksafe
    • JavascriptMinimizer - http://devtools.10try.com/
    • CSS Minification does not provide as much gain.
    Copyright Extreme Web Works - http://ProfessionalASPNET.com
  • Remove Duplicate Scripts
    • They Happen
    • Use the ScriptManager to Register JS Scripts
    • Inherit from a Base Page Class with a checking mechanism
    • Create a httpModule to check final stream
    Copyright Extreme Web Works - http://ProfessionalASPNET.com
  • Avoid Redirects
    • 30X HTTP Status Codes
    • Only use when necessary
    • Reduce Response.Redirect
    • PostBackURL
    • Server.Transfer
    • URL Rewritting
    Copyright Extreme Web Works - http://ProfessionalASPNET.com
  • Make AJAX Cacheable
    • Optimize AJAX Requests
    • http://www.codeproject.com/KB/aspnet/10ASPNetPerformance.aspx?display=Print
    <system.web.extensions>
    <scripting>
    <scriptResourceHandlerenableCaching ="true" enableCompression ="true"/>
    </scripting>
    </system.web.extensions>
    Copyright Extreme Web Works - http://ProfessionalASPNET.com