Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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 ???

share|improve this question
    
What do you want to achieve? Details around your use-case will be helpful in understanding your problem. –  Sripathi Krishnan Mar 14 '11 at 10:29

2 Answers 2

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.

Cache Control for HTTP 1.1

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.