Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to make an existing domain a "CDN" domain that serves all images, CSS and JS files (i.e. static files). However that domain was parked earlier and some application on that domain has set cookies.

As far as I can observe, I'd say that with cookies the "Expires" header doesn't seem to have much effect with some browsers (Including Firefox). The browsers still request the file, even if they shouldn't do so for the next month.

It would be possible to do some mod_rewrite tricks to detect if there are any cookies and then call a PHP file to remove the cookies and serve the static file so that for the next call there aren't any cookies left, but maybe you can give me a simpler method:

Is there a "Apache .htaccess only" way of removing all existing cookies?

share|improve this question

The Header directive might do the trick.

But I strongly doubt that a stored cookie in Firefox influences cacheing in any way.

share|improve this answer
Yeah, this is unlikely to be a cookie issue. – ceejayoz May 19 '09 at 13:15
I think BlaM wants to do something like this:…. – Keith Bentrup Jun 6 '09 at 5:02

Try :

Header unset Set-Cookie
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.