Serving images from cookieless subdomains
When you set a cookie on the browser, all subsequent requests from the browser carry that cookie, including requests for static content, such as images and CSS and JavaScript files. This is magnified by the fact that many visitors will have an asymmetric Internet connection, where the upload connection from browser to server is slower than the download connection from server to browser. If the upload connection is a quarter of the speed of the download connection, a 1000-byte cookie takes as long to transfer as a 4000-byte file.
Because the browser sends cookies only to the domain that actually set it, you can get rid of the cookie overhead by serving static content from a separate subdomain. This makes sense if you serve lots of static files and you set big cookies.
To make this work, log in to your domain registrar account and create an A
record for a new subdomain, such as img.mydomain.com
. Make sure it points to the IP address used by your website...