would like know your opinion about using
Pragma header when script is called in HTTP version 1.1
I don't know is good to return both Pragma and Cache-Control
or rather return only Cache-Control
and at HTTP 1.0 return only Pragma ???
Webmasters Stack Exchange is a question and answer site for pro webmasters. It only takes a minute to sign up.
Sign up to join this communitywould like know your opinion about using
Pragma header when script is called in HTTP version 1.1
I don't know is good to return both Pragma and Cache-Control
or rather return only Cache-Control
and at HTTP 1.0 return only Pragma ???
The correct way to deal with caching in HTTP1.1 is with the Cache-Control header. I cannot remember the last time I included Pragma in a HTML header.
Using both is fine. That way if you encounter a client that is using http 1.0 they'll be sure to honor your cache control request. Http 1.1 clients will simply ignore the redundant header so it won't cause any problems. I use both on lots of sites with no ill effects.