Mobile app version of vmapp.org
Login or Join
Si4351233

: Is it possible to setup a cookie-less directory instead of a domain? I'm familiar with how to setup a cookie-less domain, however, I have an situation where I can't setup a subdomain to store

@Si4351233

Posted in: #Cookie #Domains #Subdirectory #Subdomain

I'm familiar with how to setup a cookie-less domain, however, I have an situation where I can't setup a subdomain to store static elements.

Can I set only my directories where assets are being stored to not require a cookie in the request?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Si4351233

1 Comments

Sorted by latest first Latest Oldest Best

 

@LarsenBagley505

This is not possible unfortunately. Cookies are attached at the domain level.

The way many sites, including the entire stack exchange network, deal with this is by having static content stored on a completely separate domain name, ie: something.stackexchange.com has all the static content stored on cdn.sstatic.net. As you can see it is not simply in a different subdomain which depending on the way your cookies are saved may still result in cookies being accessed from the static content domain, but is a completely separate domain name which uses the browsers native same origin security features for cookie security to make the domain a cookie free domain.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme