Mobile app version of vmapp.org
Login or Join
Carla537

: Using Pragma header on HTTP 1.1 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

@Carla537

Posted in: #HttpHeaders

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

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Carla537

2 Comments

Sorted by latest first Latest Oldest Best

 

@Sarah324

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.

10% popularity Vote Up Vote Down


 

@Alves908

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

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme