There is a confusion in setting multiple values to the headers according to RFC2616, the response header values should be comma separated, but when i look at certain headers they are semicolon separated for example in the w3 site if you see the response header "content-type" its a semi-colon separated value. w3 site . If semicolon is accepted then , the second question is when we cache-control with semicolon separated values the cache-control does not behave correctly in chrome but works fine in fire fox. For Example ,consider the following image cachecontrol the values are semicolon separated and the behavior that is expected and working in firefox is it should not cache the page but chrome defies this and caches the page. Any help on clarification is highly appreciated, Thanks!
Asked
Active
Viewed 768 times
0
-
Does this answer your question? [Standard for adding multiple values of a single HTTP Header to a request or response](https://stackoverflow.com/questions/3096888/standard-for-adding-multiple-values-of-a-single-http-header-to-a-request-or-resp) – Joe Sep 29 '21 at 11:49
-
HTTP headers are comma-separated. See [the spec](https://datatracker.ietf.org/doc/html/rfc7231#section-3.1.1.5) for what the semicolon means in `Content-Type`. If Firefox accepts semicolon-separated values, it's a bug. See [this question](https://stackoverflow.com/questions/69163030/cache-control-headers-no-longer-interpreted-properly-in-chromium-93) for a case where Chrome got stricter, and why you shouldn't rely on non-spec behaviour. – Joe Sep 29 '21 at 11:52
-
@Joe - Thanks for the reply ,the link that you have given https://stackoverflow.com/questions/69163030/cache-control-headers-no-longer-interpreted-properly-in-chromium-93 really helped thanks ! – Parth Gandhi Sep 30 '21 at 12:34