0
ASP.NET Performance Tips<br />GettingThings Right on the Client<br />Chris Love<br />http://ProfessionalASPNET.com<br />Co...
ASP.NET Performance Tips on the Server I<br />ASP.NET Performance Tips on the Server II<br />ASP.NET Performance Tips on t...
High Performance Web Sites<br />Essential Knowledge for <br />Front-End Engineers<br />Steve Souders<br />http://amzn.to/g...
Front-End Performance Tools<br /><ul><li>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</li></ul>Copyright Extreme Web Works - http://ProfessionalASPNET.co...
Front-End Performance Rules<br />Make Fewer HTTP Requests<br />Use a Content Delivery Network<br />Add an Expires Header *...
Make Fewer HTTP Requests<br /><ul><li>Each Request Adds More Overhead
Avoid Slicing Images that are not Reused
Image Maps
CSS Sprites
Inline Images
Combine Scripts and CSS</li></ul>Copyright Extreme Web Works - http://ProfessionalASPNET.com<br />
<ul><li>Use a Content Delivery Network
More Geographically Dispersed
Upcoming SlideShare
Loading in...5
×

Web Front End Performance

1,321

Published on

This is an older session,

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,321
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
25
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • 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. 
  • Transcript of "Web Front End Performance"

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

      Clipping is a handy way to collect important slides you want to go back to later.

    ×