Job done and I only can see the header I need and the no-cache header disappeared BUT now the manager area is behaving very weird and it’s logging me out constantly saying my session expired. Doing so will risk displaying one user's personal information to others. ![]() Certain pages should never be cached by shared caches like CDNs. user.ini file and leaving this setting empty: Cache-Control is a header that you can configure your web server to add to all outgoing requests, which will tell the browser and CDNs how to cache your content. ![]() Package Phobia Find the cost of adding a new dev dependency to your project. The first problem I get is that now the Cache-control header is duplicated: Cache-Control: max-age=3600, s-maxage=3600, private, must-revalidate, proxy-revalidateĬache-Control: no-store, no-cache, must-revalidate Cache-Control: public, max-age31536000, immutable. These are the public and private directives, private being the default one. As we saw in earlier blogs, Cache-Control header field is used to specify directives for caches along the request/response chain. To set the header to public, private or no-cache, use the Response.Cache. Header set Cache-Control "max-age=3600, s-maxage=3600, private, must-revalidate, proxy-revalidate" caching proxies by adding a Cache-Control header to their response. The User ID is added to the cache key so that a separate copy is retained in the. Header set Cache-Control "max-age=2592000, private" # css and js should use private for proxy caching The Cache-Control: private response header disables any caching that might expose the response to any user but the current user. So there needs to be a way to request a Cache-Control header with all possible options: public, private, no-cache, or none. If you want the response to be cached as widely as possible, then this is what you use. Header set Cache-Control "max-age=2592000, public" 1 The Cache-Control: public response header enables any kind of intermediate cache. I don’t want that one so I added my own headers on the. By default PHP had a setting to set the default headers:Ĭache-control: no-store, no-cache, must-revalidate
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |