serving static file from cookieless domain: alternative cookieless directory
- by Simone Nigro
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>