How to force CSS and JS not to send cookies with each request?

CSS and JS files contain individual request cookies. Is there any trick to disable cookie transfer, as well as a request and response header with separate headers? There should not be a need to port them for JS and CSS files.

I am using IIS 7 and Asp.Net 4.0

+3
source share
1 answer

You will need to use a different domain, i.e. usually websites will install static.yourwebsite.com.

As long as the cookie domain is configured only on the source domain, it will not be sent to static.bla.com

Of course, it static.bla.comcan point to the same site / server, but for the browser - its different domain.

0
source

All Articles