serving static file from cookieless domain: alternative cookieless directory

Posted by Simone Nigro on Server Fault See other posts from Server Fault or by Simone Nigro
Published on 2013-11-10T13:43:58Z Indexed on 2013/11/10 15:58 UTC
Read the original article Hit count: 399

Filed under:
|
|

I'm trying to follow all the guidelines of "Google Page Speed??". The directive "Minimize request overhead" requires static content (images, js, css, etc.) on a static server (ie cookieless): https://developers.google.com/speed/docs/best-practices/request

I do not want to buy a new server and I was thinking of just setting a directory of my site without cookie with htaccess

www.mysite.com/static/.htaccess

Header unset Cookie
Header unset Set-Cookie

I do not know if it can be problematic. Looking on google it seems that no one ever has adopted this type of solution, so I think that it is incorrect. What do you think?

alternatively you could do

www.mysite.com/.htaccess

<FilesMatch "\.(css|js|jpg|png|gif)$">
Header unset Cookie
Header unset Set-Cookie
</FilesMatch> 

© Server Fault or respective owner

Related posts about apache2

Related posts about .htaccess