Private cache5/2/2023 ![]() ![]() The “ s-” prefix stands for shared as in shared cache. This asset can be cached by the browser or any downstream caches from the server for this time period. For example: max-age=300 indicates that an asset can be reused for the next 300 seconds. It states the maximum amount of time in seconds that fetched responses are allowed to be used again from the time when a request is made. In most uses of the Cache Control headers you will see this directive being used. These are the most important directives: max-age You don’t have to use all of them, so pick the ones you need and leave the others out. There are multiple directives that can be used to control the Cache Headers functionality. ![]() We’ll give you a quick walkthrough of the most common HTTP cache headers, their directives and how you can use them. Combining multiple features can give you the desired results, or they might cause your cache to not function at all because they are used incorrectly. There is a range of cache headers and their directives that give explicit instructions to any server, CDN and end-user’s browsers on how the content should be handled cache wise. In cases where there is no validator present (for example a ETag or Last-Modified header) combined with a lack of freshness info it will usually be considered uncacheable. A validated representation however will rarely send the entire copy again if it hasn’t changed since you’ve last requested it. ![]() New requests will typically give you a fresh copy of the content instantly served from the cache. We’ll show you the ins and outs when it comes to cache headers, so in the future you’ll know how to use them! What do these headers do?Īny kind of caching would normally work through freshness and validation. Right now, we’ll be focussing on a specific subset of these: the cache headers. There are a lot of different HTTP headers that can be used by your website. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |