What does the HTTP header Pragma: Public mean?
The Pragma HTTP/1.0 general header is an implementation-specific header that may have various effects along the request-response chain. This header serves for backwards compatibility with the HTTP/1.0 caches that do not have a Cache-Control HTTP/1.1 header.
To check the Pragma in action go to Inspect Element -> Network check the header for Pragma like below. Pragma header is highlighted.
"The Pragma: no-cache header field is an HTTP/1.0 header intended for use in requests. It is a means for the browser to tell the server and any intermediate caches that it wants a fresh version of the resource, not for the server to tell the browser not to cache the resource.
Cache-control is an HTTP header used to specify browser caching policies in both client requests and server responses. Policies include how a resource is cached, where it's cached and its maximum age before expiring (i.e., time to live).
According to the standard, Pragma is implementation dependent (section 14.32), except for no-cache because of its wide use. Cache-Control (section 14.9) is the proper way to control caching. This is what the standard says for a Cache-Control: public
:
Indicates that the response MAY be cached by any cache, even if it would normally be non-cacheable or cacheable only within a non- shared cache.
Also, "Pragma: Public" is used in Google App Engine applications to enable caching of responses within its Edge Cache.
See Details on Google App Engine's caching proxy?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With