HTML5缓存清单背后基本认证? [英] HTML5 Manifest Cache behind Basic Auth?

查看:106
本文介绍了HTML5缓存清单背后基本认证?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个的使用HTML5缓存和工作可爱的一个网站。

I've got a site that's using HTML5 caching and working lovely.

当我使用基本身份验证(htpasswd的)保护现场缓存似乎并没有工作。理想情况下,我想现场缓存身份验证的用户。我的理论是,当他们访问该网站离线服务器实际上并没有被击中,因此显示缓存的版本。

When I protect the site using Basic Auth (.htpasswd) the caching doesn't seem to work. Ideally I'd like the site to cache for authenticated users. My theory is that when they visit the site offline the server isn't actually being hit and so the cached version is displayed.

是不是,如果他们被保护的网页不缓存HTML5规范的一部分?我找不到这个任何引用。

Is it part of the HTML5 specification that pages aren't cached if they are protected? I couldn't find any reference to this.

有没有人成功地创建一个密码保护缓存应用程序?

Has anyone successfully created a password protected cacheable application?

我不知道这是否是特定的浏览器,但我测试的Safari浏览器 - 这是一个iPad应用

I'm not sure if this is browser specific but I'm testing in Safari - it's an iPad application.

在此先感谢

推荐答案

另一些人抱怨在iOS 3.x中同样的问题,上述移动清单文件的权威性目录之外似乎解决的事情:
http://lists.apple.com/archives /safari-iphone-web-dev/2010/Sep/msg00000.html

Some other people were complaining about the same problem on iOS 3.x and said moving the manifest file outside of the auth directory seemed to fix things: http://lists.apple.com/archives/safari-iphone-web-dev/2010/Sep/msg00000.html

我是能够解决的问题,有问题的文件夹中的.htaccess文件看起来是这样的:

I was able to work around the problem with an .htaccess file in the folder in question that looked like this:

AddType text/cache-manifest .manifest
<FilesMatch "your.manifest">
    Order Allow,Deny
    Allow from all
</FilesMatch>

这篇关于HTML5缓存清单背后基本认证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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