How to solve [Serve the following static resources from a domain that doesn't set cookies]

Jornes picture Jornes · Jun 11, 2016 · Viewed 34.5k times · Source

I'm struggling in something i don't know at all. When the time i ping my website, i got this result: [Serve the following static resources from a domain that doesn't set cookies:]. And, this result caused from the images which i used for background images. I tried to google about this topic but all the answers seem to be difficult to understand of. Does anyone here knows about it and any simple solution to fix it up?

Answer

vegemite4me picture vegemite4me · Jul 1, 2016

I'll try and give a very high level overview as you haven't given a lot of specifics in your question. Please be aware that there are many ways to solve this issue, and I will attempt to give one solution which I think is easy to understand.

That message is suggesting that if your website is www.company.com, then you should load static content from www.companycdn.com. And that new site (www.companycdn.com) is a simple static website that does not serve cookies.

To do this, you need to upload your static resource (e.g. images) to the second domain.

And then update the paths of images to the new domain. For example, instead of this: <img src="logo.jpg"/>, you should change it to this <img src="//www.companycdn.com/logo.jpg"/>

This answer has more information: https://webmasters.stackexchange.com/questions/1772/how-do-i-set-up-a-cookie-less-domain