TAILIEUCHUNG - Professional ASP.NET 3.5 in C# and Visual Basic Part 113

Professional in C# and Visual Basic Part 113. Building on the revolutionary release, adds several key new developer features including AJAX, LINQ, and a new CSS designer in Visual Web Developer 2008. The dramatic reduction in code that developers realized from the more than 50 new server controls in now allows developers the time to make their applications more interactive with AJAX, to work with data in their preferred language with LINQ, and to build visually attractive and consistent standards-based sites with CSS. . | Chapter 23 Caching The HttpCachePolicy class gives you an object model for managing client-side state that insulates you from adding HTTP headers yourself. Add the lines from Listing 23-3 to your Page_Load to influence the Response s headers and the caching behavior of the browser. This listing tells the browser not to cache this Response in memory nor store it on disk. It also directs the Response to expire immediately. Listing 23-3 Using HTTP Headers to force the browser not to cache on the client-side VB Protected Sub Page_Load ByVal sender As Object _ ByVal e As Handles End Sub C protected void Page_Load object sender EventArgs e Figure 23-3 1079 Chapter 23 Caching Compare the results of running Listing 23-3 in the before Figure 23-2 and then in the after Figure 23-3. Two new HTTP headers have been injected directing the client s browser and the Cache-Control Header has changed to no-cache no-store. The Output Caching HttpModule will respect these HTTP headers so sending no-cache no store to the browser also advises the HttpModule to record the response as a cache miss. If your application contains a considerable number of relatively static or non-time-sensitive pages consider what your client-side caching strategy is. It s better to take advantage of the disk space and the memory of your users powerful client machines rather than burdening your server s limited resources. Caching Programmatically Output Caching is a very declarative business. UserControls and Pages can be marked up with OutputCache directives and dramatically change the behavior of your site. Declarative caching controls the

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.