我使用.htaccess来用密码保护网站。.htaccess受密码保护的网站需要在每个页面重新加载Ipad的密码
如果我在该网站上使用html5音频元素,我的ipad需要每次重新加载时的网站密码,尽管它保存在浏览器中。
只在Ipad上。没有扎根,所有原始的ios。 通过Ipad上的Chrome和Safari测试,始终如一。
如果页面上没有音频元素,则不需要密码。
这不会发生在Windows平板电脑或Firefox中。
我可以编程什么来防止Ipad询问密码?
我从本网站使用以下code。
<!DOCTYPE HTML>
<html>
<head>
<title>Audio</title>
</head>
<body>
<script>
function play(){
var audio = document.getElementById("audio");
audio.play();
}
</script>
<input type="button" value="PLAY" onclick="play()">
<audio id="audio" src="./207.wav"></audio>
</body>
</html>
的的.htaccess:
AuthType Basic
AuthName name123
AuthUserFile /somepath/.htpasswd
require valid-user
SetEnv no-gzip
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 1 seconds"
AddDefaultCharset UTF-8
我想你需要提供的.htaccess文件的其他麻烦拍摄? – cytsunny
当然,谢谢。 – Roman