List of Listings

Chapter 4. Caching: The sell-by date

Listing 4.1. Applying output caching to an Action

Listing 4.2. Applying OutputCache to the Product page

Listing 4.3. Applying the Location setting to the OutputCache

Chapter 5. Minifying and bundling static files

Listing 5.1. CSS code before minification

Listing 5.2. CSS code after minification

Listing 5.3. JavaScript code before minification

Listing 5.4. javaScript code after minification

Listing 5.5. Creating Script and Style bundles

Listing 5.6. The Global.asax file

Listing 5.7. The BundleConfig class for the SurfStore application

Listing 5.8. _Layout.cshtml with bundling and minification applied

Listing 5.9. The Global.asax file

Listing 5.10. The BundleConfig class

Listing 5.11. Site.Master page with bundling and minification applied

Chapter 6. HTML optimization tips

Listing 6.1. Style Sheets located at the bottom of the page

Listing 6.2. Style sheets located at the top of the page

Listing 6.3. The order of external styles and scripts

Listing 6.4. The correct order for external scripts and styles

Listing 6.5. An example of asynchronous JavaScript in action

Listing 6.6. Using Web Workers in a Layout View

Listing 6.7. The JavaScript file of a Web Worker

Listing 6.8. The JavaScript file of a Web Worker

Listing 6.9. Using Web Workers in a Master page

Listing 6.10. The JavaScript file of a Web Worker

Listing 6.11. The server-side code of an AJAX-enabled WCF service

Listing 6.12. A typical cache manifest file

Listing 6.13. Referencing the manifest file

Listing 6.14. The AppCacheController

Listing 6.15. The dynamic manifest file

Listing 6.16. Referencing the manifest file

Listing 6.17. The dynamic manifest file

Chapter 7. Image optimization

Listing 7.1. Checking to determine if the browser can handle data URIs

Listing 7.2. Determining if the browser can handle data URIs

Listing 7.3. Converting an image to a Base64-encoded string

Listing 7.4. Creating a snippet of HTML to return in the HTML Helper

Listing 7.5. Implementing the HTML helper on the view

Listing 7.6. Checking to determine if the browser can handle data URIs

Listing 7.7. Determining if the browser is capable of handling data URIs

Listing 7.8. Converting an image to a Base64-encoded string

Listing 7.9. Creating a snippet of HTML to return as an HTML string

Listing 7.10. Implementing the static method on the web page

Chapter 8. ETags

Listing 8.1. A custom module to remove ETags

Chapter 9. Content Delivery Networks

Listing 9.1. Adding the CDN URL to the Web.config file

Listing 9.2. Using the CDN URL in Debug/Release mode

Listing 9.3. Adding the CDN URL to the Web.config

Listing 9.4. Using the CDN URL in Debug/Release mode

Chapter 10. Tweaking ASP.NET MVC performance

Listing 10.1. Remove unused view engines in your Global.asax file

Listing 10.2. A Web.config file with debug=true attribute

Listing 10.3. Ignoring the favicon in the RouteConfig.cs file

Listing 10.4. Common web clip icons

Listing 10.5. Ignoring web clip icons in the RouteConfig.cs file

Listing 10.6. Add UI components to the Layout view

Listing 10.7. Start the profiler in the Global.asax file

Listing 10.8. The Action on the MVC controller

Listing 10.9. A factory for returning a MiniProfiler DbConnection

Chapter 11. Tweaking ASP.NET Web Forms performance

Listing 11.1. Working with ClientIDMode in Visual Studio

Listing 11.2. A Web.config file with debug=true attribute

Listing 11.3. Disabling tracing in Web.config

Listing 11.4. ViewState inside an HTML page

Listing 11.5. Add UI components to the Master page

Listing 11.6. Start the profiler in the Global.asax

Listing 11.7. Profiling the Product.aspx page

Chapter 12. Data caching

Listing 12.1. Basic methods to add and retrieve items from cache

Listing 12.2. Adding and retrieving items from cache

Listing 12.3. Using the cache in the sample application

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset