Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache / PHP Disable Cookies for Subdomain?

I am trying to follow these guidelines to make my page load quicker.

I have created a static subdomain to load static content from, however it is advising me to not have cookies sent on this subdomain, any ideas on how I might be able to do this in Apache/PHP?

I've searched around and come up with nothing yet.

like image 765
stukerr Avatar asked Jul 22 '09 14:07

stukerr


1 Answers

If you never explicitly set a cookie, cookies won't be present on the server. So, if you are using the second domain simply as a repository for images or CSS files, most likely no cookies are ever set.

Updated from Comments.

If you see a 'Request' cookie header to a subdomain you don't want to have cookies, clear your cookies and see if the server ever sends a cookie header in the Response headers. If it does, it is possible you have session.auto_start enabled, or you have a script that sets cookies.

You can check the Request and Response Headers using something like Firebug with Google Page Speed.

like image 172
Tyler Carter Avatar answered Oct 13 '22 01:10

Tyler Carter