Serve static content from a cookieless domain

Discussion in 'Coding Help' started by andywozhere, Oct 18, 2010.

  1. andywozhere

    andywozhere Member

    I've set up an sub-domain that is to hold static content for a site. The idea is that the sub-domain will not set cookies and therefore speed thing up a bit. I'm a bit stuck setting Apache not to set cookies. I'm assuming this can be done via .htaccess... any tips would be much appreciated!
  2. andywozhere

    andywozhere Member

    Of course I end up finding a solution just after I posted (after hours of searching):

    <FilesMatch "\.(html|htm|js|css)$">
    FileETag None
    <IfModule mod_headers.c>
    Header unset ETag
    Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
    Header set Pragma "no-cache"
    Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
    Manipulating HTTP Headers with htaccess

Share This Page