What is the no-cache = "Set-Cookie" setting?

I am trying to configure header caching. I have the following code in vb.net:

With HttpContext.Current.Response 
   .Cache.SetCacheability(HttpCacheability.Public)
   .Cache.SetRevalidation(HttpCacheRevalidation.AllCaches)
   .Cache.SetLastModified(Now)
   .Cache.SetExpires(DateTime.UtcNow.AddSeconds(120))
   .Cache.SetMaxAge(TimeSpan.FromSeconds(120))
End With

Returns the following headers:

Cache-Control: public, no-cache="Set-Cookie", must-revalidate, max-age=120
Content-Type: application/xml; charset=utf-8
Expires: Mon, 22 Aug 2016 13:54:36 GMT
Last-Modified: Mon, 22 Aug 2016 13:52:36 GMT

But I'm trying to figure out what installs no-cache="Set-Cookie"and how can I turn it on or off?

+4
source share
1 answer

No-cache = "Set-Cookie" tells the browser not to cache the "Set-Cookie" server header, but to follow the rest of the requests. Here is a W3C discussion http://www.w3.org/Protocols/HTTP/Issues/cache-private.html

http 1.1   ,    . , :    cache-control: no-cache = "set-cookie"

+1

Source: https://habr.com/ru/post/1652065/


All Articles