解决方法[从未设置Cookie的域中提供以下静态资源] [英] How to solve [Serve the following static resources from a domain that doesn't set cookies]

查看:91
本文介绍了解决方法[从未设置Cookie的域中提供以下静态资源]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为自己根本不了解的事情而苦苦挣扎。 ping我的网站时,得到了以下结果: [从未设置cookie的域中提供以下静态资源:] 。并且,此结果是由我用于背景图像的图像引起的。我试图用谷歌搜索这个话题,但是所有的答案似乎很难理解。

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?

推荐答案

我会尽力提供一个很高的水平吗?概述,因为您没有在问题中提供很多细节。请注意,有很多方法可以解决此问题,我将尝试给出一种我认为易于理解的解决方案。

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.

该消息表明,如果您的网站是 www.company.com ,那么您应该从 www.companycdn.com 加载静态内容。而这个新站点( www.companycdn.com )是一个不提供Cookie的简单静态网站。

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.

然后将图像的路径更新到新域。例如,代替此:< img src = logo.jpg /> ,您应该将其更改为此< img src = // www.companycdn.com/logo.jpg />

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"/>

此答案包含更多信息:https://webmasters.stackexchange.com/questions/1772/how-do -i-set-a-cookie-less-domain

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

这篇关于解决方法[从未设置Cookie的域中提供以下静态资源]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆