301 Moved Permanently Http Mdn Mdn Web Docs

Elena Vance
-
301 moved permanently http mdn mdn web docs

Cache-Group-Invalidation When an unsafe request changes server state, related cached entries often need purging. The Cache-Group-Invalidation response header identifies cache groups to invalidate after an unsafe request completes. Usage HTTP caches store responses using request URLs as keys. When content changes, servers invalidate cached copies by sending invalidation signals. The Cache-Group-Invalidation header extends this mechanism by allowing servers to invalidate multiple related cache entries with a single response. The Cache-Groups specification defines a framework for grouping stored responses under shared string identifiers.

When a cache stores a response with a Cache-Groups header listing group names, the cache associates the stored entry with those groups. Later, when the server sends Cache-Group-Invalidation in response to an unsafe request (like POST, PUT, or DELETE), the cache invalidates all stored responses belonging to the listed groups. This header appears only in responses to unsafe methods. Caches ignore Cache-Group-Invalidation on responses to safe methods like GET or HEAD, since safe methods do not modify server state and therefore do not trigger invalidation.

A common use case involves content collections. When an origin receives a POST request creating a new article, the server includes Cache-Group-Invalidation: "article-list" in the response. Caches purge all stored responses previously tagged with the "article-list" group, ensuring subsequent requests for listing pages fetch fresh data reflecting the newly created article. Values The Cache-Group-Invalidation header value is a structured list of strings. Each string identifies a cache group to invalidate. Multiple group names are separated by commas.

Cache-Group-Invalidation: "group1", "group2" Caches invalidate any stored response associated with at least one of the listed groups. The invalidation applies within the same origin, not limited to a single URL or path prefix. Group names are opaque strings defined by the origin server. No standard naming convention exists, but practical deployments often use descriptive identifiers like "homepage", "catalog", or "user-sessions". Example After a POST request creates a new product, the server signals invalidation of the product catalog listing. The cache purges stored responses tagged with the "catalog" group.

Cache-Group-Invalidation: "catalog" A PUT request updating a blog post invalidates both the post itself and the category index listing. The response lists two groups, triggering invalidation of all cached entries associated with either group. Cache-Group-Invalidation: "post-123", "category-tech" A DELETE request removing a user account invalidates multiple related cache groups covering user profiles, session lists, and admin dashboards. Cache-Group-Invalidation: "users", "sessions", "admin-stats"

People Also Asked

HTTP 301 - Wikipedia?

Cache-Group-Invalidation When an unsafe request changes server state, related cached entries often need purging. The Cache-Group-Invalidation response header identifies cache groups to invalidate after an unsafe request completes. Usage HTTP caches store responses using request URLs as keys. When content changes, servers invalidate cached copies by sending invalidation signals. The Cache-Group-Inv...

301 Moved Permanently - HTTP | MDN - MDN Web Docs?

Cache-Group-Invalidation When an unsafe request changes server state, related cached entries often need purging. The Cache-Group-Invalidation response header identifies cache groups to invalidate after an unsafe request completes. Usage HTTP caches store responses using request URLs as keys. When content changes, servers invalidate cached copies by sending invalidation signals. The Cache-Group-Inv...

content/files/en-us/web/http/status/301/index.md at main · mdn/content?

Cache-Group-Invalidation When an unsafe request changes server state, related cached entries often need purging. The Cache-Group-Invalidation response header identifies cache groups to invalidate after an unsafe request completes. Usage HTTP caches store responses using request URLs as keys. When content changes, servers invalidate cached copies by sending invalidation signals. The Cache-Group-Inv...

301 永久移动 - Http | Mdn - Mdn 文档?

Cache-Group-Invalidation When an unsafe request changes server state, related cached entries often need purging. The Cache-Group-Invalidation response header identifies cache groups to invalidate after an unsafe request completes. Usage HTTP caches store responses using request URLs as keys. When content changes, servers invalidate cached copies by sending invalidation signals. The Cache-Group-Inv...

301 Moved Permanently - HTTP status code explained?

Cache-Group-Invalidation When an unsafe request changes server state, related cached entries often need purging. The Cache-Group-Invalidation response header identifies cache groups to invalidate after an unsafe request completes. Usage HTTP caches store responses using request URLs as keys. When content changes, servers invalidate cached copies by sending invalidation signals. The Cache-Group-Inv...