HTML5缓存清单:将所有远程资源列入白名单? [英] HTML5 cache manifest: whitelisting ALL remote resources?

查看:110
本文介绍了HTML5缓存清单:将所有远程资源列入白名单?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作包含博客的桌面版网站的iPhone版本。博客经常嵌入来自其他域的图像(图像URL总是以http://开头,在这种情况下,显然),但因为我使用的是cache-manifest,所以这些图像不会加载,因为它们未在清单文件。

I'm doing an iPhone version of a desktop site that includes a blog. The blog often embeds images from other domains (the image URLs always start with http:// in this case, obviously), but because I'm using cache-manifest, these images don't load because they aren't declared in the manifest file.

我有一个NETWORK:白名单部分,其中包含我的所有AJAX请求文件等。我甚至将flickr农场域列入白名单,因为很多我们添加到博客的图片来自我们的flickr页面。 flickr图像显示得很好,但来自另一个域的任何其他随机图像热链接显示已损坏。

I have a NETWORK: whitelist section that has all of my AJAX request files, etc. I've even whitelisted the flickr farm domains because a lot of the images we add to the blog come from our flickr page. The flickr images show up just fine, but any other "random" image hotlinks from another domain show broken.

我尝试添加这样一行:

http://

到NETWORK:部分,但它似乎不喜欢http://作为白名单。

to the NETWORK: section, but it doesn't seem to like http:// as a whitelist.

有没有人对此有任何想法?

Does anyone have any thoughts on this?

谢谢!
Alex

Thanks! Alex

推荐答案

只需在您的清单中添加在线白名单通配标志:

just add the "online whitelist wildcard flag" to your manifest:

NETWORK:
*

应该做的伎俩!更多信息在whatwg规格页面上

that should do the trick! more info on the whatwg spec page

希望这有帮助!

这篇关于HTML5缓存清单:将所有远程资源列入白名单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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