Mobile app version of vmapp.org
Login or Join
Moriarity557

: Serving images from different domain Google audit: Serve static content from a cookieless domain (15) 2.65KB of cookies were sent with the following static resources. Serve these static

@Moriarity557

Posted in: #ImageHosting #Images #PageSpeed

Google audit:


Serve static content from a cookieless
domain (15)
2.65KB of cookies were sent with the following static resources. Serve
these static resources from a domain
that does not set cookies:


If my domain is widgets.com, should I set up a img.widgets.com that servers these resources? How beneficial is this?

Edit

I setup img.widgets.com to serve images from, and changed all images to this URL. But I still get that message?

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Moriarity557

3 Comments

Sorted by latest first Latest Oldest Best

 

@Si4351233

Using img.widgets.com for cookieless requests won't work if your main pages are hosted on widgets.com (as opposed to a subdomain, like widgets.com). This is because the domain scope of a cookie is a domain and all subdomains, and so if the cookie's domain is widgets.com (necessary to get the cookie sent to widgets.com) then the cookie will also get sent in requests to img.widgets.com.

So, if your service is based on widgets.com cookies, you'd need to use a separate domain to host your cookieless items.

10% popularity Vote Up Vote Down


 

@Frith620

Each time someone request anything all cookies matching domain are sent. This adds weight to every request in proportion to how much cookies your site uses.

Since it seems your site relies heavily on cookies, you visitors should see a speed improvement if you serve images (and any static content, even css/js/etc) from a separate domain.

Google uses google.com and googlestatic.com which makes it easy to separate resources.

If you want to use subdomains (or paths) then you have to be more careful specifying your cookies' validity path.

10% popularity Vote Up Vote Down


 

@Merenda212

The best reason for doing this that I can think of is for faster page loading. Since you can only download so much from one domain at a time, having your images on a separate domain allows you to load them just a little bit faster.

And from the note that google gives you, it also appears that your cookies may be impacting your image loading.

I've done this for really image heavy pages, but not for most normal pages, but if Google things its a good idea, it might be worth a try.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme