What's the difference in browser behavior between two headers Cache-control: max-age=0
and Cache-control: max-age=-1
?
If the browser receives max-age=0, it will revalidate cache immediately. If the browser receives max-age=10, it will revalidate cache after 10 seconds. What's browser behavior with max-age=-1? Is it the same like with max-age=0? If yes, why we need both?
max-age
takes an argument that matchesdelta-seconds
:max-age=-1
is therefore not a valid directive, and the specification doesn't define an interpretation. The spec suggests: