Practical mod_perl-CHAPTER 16:HTTP Headers for Optimal Performance

Tham khảo tài liệu 'practical mod_perl-chapter 16:http headers for optimal performance', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Page 529 Thursday November 18 2004 12 43 PM CHAPTER 16 HTTP Headers for Optimal Performance Header composition is often neglected in the CGI world. Dynamic content is dynamic after all so why would anybody care about HTTP headers Because pagss are generated dynamically one might expect that pages without a Last-Modified header are fine and that an If-Modified-Since header in the client s request can be ignored. This laissez-faire attitude is a disadvantage when you re trying to create a server that is entirely driven by dynamic components and the number of hits is significant. If the number of hits on your server is not significant and is never going to be then it is safe to skip this chapter. But if keeping up with the number of requests is important learning what cacherfriendliness means and how to cooperate with caches to increase the performance of the site can provide significant benefits. If Squid or mod_proxy is used in httpd accelerator mode as discussed in Chapter 12 it is crucial to learn how best to cooperate with it. In this chapter when we refer to a section in the HTTP standard we are using HTTP standard which is documented in RFC 2616. The HTTP standard describes many headers. In this chapter we discuss only the headers most relevant to caching. We divide them into three sets date headers content headers and the special Vary header. Date-Related Headers The various headers related to when a document was created when it was last modified and when it should be considered stale are discussed in the following sections. Date Header Section of the HTTP standard deals with the circumstances under which we must or must not send a Date header. For almost everything a normal mod_perl user does a Date header needs to be generated. But the mod_perl programmer doesn t have to worry about this header since the Apache server guarantees that it is always sent. 529 Page 530 Thursday November 18 2004 12 43 PM In the .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã 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.