我可以在HTML5应用程序缓存清单中使用与协议无关的URL吗?

abi*_*one 0 html5 application-cache

我们有许多网站使用相同的代码库来运行不同的网站,具体取决于所使用的域名,我们正在寻求使用HTML5应用程序缓存来提高这些网站的性能,以缓存诸如网络字体和其他大型网站之类的内容,很少更新的文件.

目前,我们使用HTTPS对完全限定的URL进行硬编码,以防其中一个网站使用SSL.我们的"静态"网站服务器可以处理HTTP和HTTPS,因此不要这样做:

CACHE MANIFEST
# Cache Version 3198.729

https://static.ourdomain.co.uk/fonts/webfont1.eot
https://static.ourdomain.co.uk/fonts/webfont1.ttf
https://static.ourdomain.co.uk/fonts/webfont1.woff
Run Code Online (Sandbox Code Playgroud)

我们希望能够这样做:

CACHE MANIFEST
# Cache Version 3198.729

//static.ourdomain.co.uk/fonts/webfont1.eot
//static.ourdomain.co.uk/fonts/webfont1.ttf
//static.ourdomain.co.uk/fonts/webfont1.woff
Run Code Online (Sandbox Code Playgroud)

这样做我们可能会遇到任何问题吗?

lan*_*nzz 5

//static.ourdomain.co.uk/fonts/webfont1.eot只是一个相对的URL./fonts/webfont1.eot只要相对URL可以接受,它就是允许的.