0

I want to achieve cookie free image serving as discussed here :

http://code.google.com/speed/page-speed/docs/request.html#ServeFromCookielessDomain

I have created a new sub-domain "static.example.com" serving only images, javscript and css (file serving restrictions made via filesmatch.conf file) , pls. tell how to make it serve cookie free images.

Thanks

iTech
  • 355
  • 5
  • 15

2 Answers2

1

For Drupal (and probably Wordpress) this can be easily fixed by setting up $cookie_domain = 'www.example.com' value in settings.php.

iTech
  • 355
  • 5
  • 15
0

You should make the cookie specific for the "dynamic" domain, e.g. instead of

Set-Cookie:  name=newvalue; expires=date; path=/; domain=.example.org

do this

Set-Cookie:  name=newvalue; expires=date; path=/; domain=www.example.org

then the client will not send the cookie to retrieve the static content.

It seems this can be done at the Apache level with mod_headers. What you probably need is to add a line to your "dynamic" domain like (not tested):

Header edit Set-Cookie domain=.example.org domain=www.example.org