HTTP 304 Not Modified vs 308 Permanent Redirect
Both HTTP 304 (Not Modified) and 308 (Permanent Redirect) belong to the 3xx Redirection category. 304 indicates that the resource has not been modified since the last request. The client can use its cached copy. Meanwhile, 308 means that the resource has been permanently moved. Like 301, but guarantees the HTTP method will NOT be changed.
Description
The resource has not been modified since the last request. The client can use its cached copy.
When You See It
When the browser cache is still valid (If-None-Match / If-Modified-Since headers match).
How to Fix
No fix needed. This saves bandwidth by confirming the cached version is still current.
Description
The resource has been permanently moved. Like 301, but guarantees the HTTP method will NOT be changed.
When You See It
For permanent URL changes where POST requests must remain POST.
How to Fix
Update all references to the new URL. The HTTP method is preserved.
Key Differences
HTTP 304: The resource has not been modified since the last request. The client can use its cached copy.
HTTP 308: The resource has been permanently moved. Like 301, but guarantees the HTTP method will NOT be changed.
You encounter 304 when when the browser cache is still valid (If-None-Match / If-Modified-Since headers match).
You encounter 308 when for permanent URL changes where POST requests must remain POST.
When to Use Which
For 304 (Not Modified): No fix needed. This saves bandwidth by confirming the cached version is still current. For 308 (Permanent Redirect): Update all references to the new URL. The HTTP method is preserved.