Chapter 1. High-speed websites
Figure 1.1. The performance cycle
Chapter 2. First steps toward a faster website
Figure 2.1. An HTTP GET request
Figure 2.2. An HTTP GET response
Figure 2.3. Multiple requests to www.mozilla.org
Figure 2.5. Waterfall chart for www.deanhume.com
Figure 2.6. Waterfall chart for Asos.com
Figure 2.7. Accessing Chrome developer tools
Figure 2.9. Waterfall chart for www.deanhume.com using IE developer tools
Figure 2.10. Waterfall chart for www.deanhume.com using www.webpagetest.org
Figure 2.11. Yahoo! YSlow tool run against www.deanhume.com
Figure 2.12. Google PageSpeed tool run against www.deanhume.com
Chapter 3. Compression
Figure 3.2. The difference in file sizes before and after using Gzip
Figure 3.4. The Surf Store application
Figure 3.5. The Surf Store’s download folder structure
Figure 3.6. Step 1 in enabling compression in IIS 7
Figure 3.7. Step 2 in enabling compression in IIS 7
Figure 3.8. The file size savings after adding Gzip to the Surf Store application
Figure 3.9. The Web.config settings that enable IIS compression
Figure 3.12. The Surf Store application’s performance score as calculated by the Yahoo! YSlow tool
Figure 3.13. The average total page weight (source: HttpArchive.org)
Chapter 4. Caching: The sell-by date
Figure 4.2. An HTTP request for a CSS file
Figure 4.3. An HTTP response for a CSS file
Figure 4.4. A repeat request for a CSS file which returns a 304 HTTP status
Figure 4.6. Set the HTTP Response Headers in IIS Manager.
Figure 4.7. IIS–Adding custom HTTP Response Headers
Figure 4.8. HTTP Response Expires for the CSS files in the Surf Store application
Figure 4.9. The Empty and Primed caches for the sample application after adding Expires headers
Figure 4.10. Adding HTTP cache settings in the Web.config
Figure 4.12. Applying output cache to a web page
Figure 4.13. Applying OutputCache to an ASP.NET Web Forms page
Figure 4.14. Applying output cache to the Product page with the VaryByParam and Location properties
Figure 4.15. The Google PageSpeed score after applying HTTP caching
Figure 4.16. The Yahoo! YSlow score after applying HTTP caching
Chapter 5. Minifying and bundling static files
Figure 5.2. The default BundleConfig.cs is added to an ASP.NET 4.5 application
Figure 5.4. Creating a new MVC 4 project in Visual Studio 2012
Figure 5.5. The Layout view in an MVC project
Figure 5.6. The new HTML helpers automatically produce the HTML required for your bundles.
Figure 5.10. The Site.Master file in an ASP.NET Web Forms application
Figure 5.11. The new HTML helpers automatically produce the HTML required for your bundles
Figure 5.15. The Google PageSpeed score after applying minification and bundling
Figure 5.16. The Yahoo! YSlow score after applying bundling and minification
Chapter 6. HTML optimization tips
Figure 6.1. A simulated waterfall chart showing the CSS at the bottom of the HTML document
Figure 6.2. A waterfall chart showing the CSS at the top of the HTML document
Figure 6.5. A waterfall chart showing the CSS placed in the document head
Figure 6.6. The performance cycle
Figure 6.7. A waterfall chart for JavaScript that is run using the HTML5 async attribute
Figure 6.9. Web Workers are able to run in parallel to the main browser thread.
Figure 6.10. Adding a new JavaScript file to the Scripts folder in an ASP.NET MVC application
Figure 6.11. The Web Worker in the Network tab in an ASP.NET MVC application
Figure 6.12. Adding a new JavaScript file to the Scripts folder in an ASP.NET Web Forms application
Figure 6.13. The Web Worker being downloaded and executed in an ASP.NET Web Forms application
Figure 6.14. The HTML5 application cache workflow
Figure 6.16. The resources stored in the application cache in an ASP.NET MVC application
Chapter 7. Image optimization
Figure 7.2. Image quality isn’t affected by lossless optimization.
Figure 7.3. The file savings gained by using the Yahoo! Smush.it tool
Figure 7.4. The command line settings for Pngcrush
Figure 7.5. The command line settings for Jpegtran
Figure 7.7. The updated header bar in the Surf Store application in an ASP.NET MVC application
Figure 7.8. Adding a new class in the Solution Explorer
Figure 7.9. The result of the data URI image tag in the header
Figure 7.11. Add a new class file called DataUriUtils in the Solution Explorer
Figure 7.12. The result of the data URI image tag in the header in an ASP.NET MVC application
Figure 7.14. The PageSpeed score after applying the updates in this chapter
Figure 7.15. The Yahoo! YSlow score after making the image updates described in this chapter
Figure 7.16. The Yahoo! YSlow score after making the image updates described in this chapter
Chapter 8. ETags
Figure 8.1. The ETag is sent back by the server in an HTTP response.
Figure 8.5. The Yahoo! YSlow rule recommends configuring ETags.
Figure 8.6. The custom module in the Surf Store application.
Figure 8.7. Add the custom HTTP module that removes the ETags to the Web.config.
Figure 8.8. The HTTP Response headers show that there are no more ETags.
Figure 8.9. The Yahoo! YSlow performance score before removing ETags.
Figure 8.10. The Yahoo! YSlow performance score after removing ETags
Chapter 9. Content Delivery Networks
Figure 9.1. A typical collection of CDN nodes scattered in different locations around the world
Figure 9.3. The request details for deanhume.com against a test location in Geneva, Switzerland
Figure 9.4. Most browsers are only able to download from a limited number of connections per domain.
Figure 9.5. A snapshot of the network components that are downloaded when you visit www.amazon.com.
Figure 9.6. The Yahoo! YSlow score for the Surf Store application still needs some improvement.
Figure 9.7. A new class file is added to the SurfStoreApp MVC project.
Figure 9.8. A new class file is added to the SurfStoreApp project.
Figure 9.10. The YSlow performance score after moving the content onto a CDN
Figure 9.11. The Google PageSpeed score after moving the static content to a CDN.
Chapter 10. Tweaking ASP.NET MVC performance
Figure 10.1. When you create a new ASP.NET MVC project, you have a choice of view engines.
Figure 10.8. The NuGet package manager UI
Figure 10.9. MiniProfiler results capture the full page cycle as well as internal code.
Figure 10.10. MiniProfiler’s results after the code update.show improved performance.
Figure 10.11. MiniProfiler results that show duplicate SQL queries being executed.
Chapter 11. Tweaking ASP.NET Web Forms performance
Figure 11.1. Generating different IDs with ClientIDMode on an ASP.NET control
Figure 11.5. The NuGet package manager UI
Figure 11.6. MiniProfiler results. They capture the full page cycle as well as internal code.
Chapter 12. Data caching
Figure 12.1. Caching can be applied to different layers of your application.
Figure 12.2. A reference to System.Runtime.Caching added to your application
Appendix Appendix
Figure A.1. Internet Information Services (IIS) Manager
Figure A.2. Set up the site name and physical location of your website.
3.139.80.52