What is the Pragma Header? Caching pages.. and IE

前端 未结 1 1390
小蘑菇
小蘑菇 2021-02-01 16:36

So I am sending a header in php to cache my page (this integrates into our \"CDN\" (contendo/akamai) as well). I always use this pragma: cache header, I\'ve seen various example

1条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-01 17:03

    In a very simplified form, Pragma:no-cache or Pragma:cache are now "almost" obsolete ways of passing caching instructions to client implementations, specifically browers and proxies. The way the client implementation responds to Pragma headers vary which is why the specification says it is implementation specific.

    The more modern way of Cache-control is what you can safely depend on, as almost all client implementations follow it rigidly.

    Also, if you have both Cache-control and Pragma set for the same instruction, say caching, then Cache-control takes precedence.

    This is an excellent article about everything related to Caching and I think it makes a very interesting and useful read: http://www.mnot.net/cache_docs/

    0 讨论(0)
提交回复
热议问题