title: .htaccess Password protected website requires Password at every page reload on Ipad
body: <p>I use .htaccess to protect a website with a password.</p>
  
  <p>If i use html5 audio elements on that website my Ipad requires the website password at each reload, although it's saved in the browser.</p>
  
  <p>Only on Ipad. Not rooted, all original ios. 
  Tested with Chrome and Safari on Ipad, always the same.</p>
  
  <p>If there is no audio element on the page, it doesn't require the password.</p>
  
  <p>This doesn't happen on an Android Tablet or Firefox in Windows.</p>
  
  <p>What can i program to prevent the Ipad asking for the password?</p>
  
  <p>I use the following <a href="https://stackoverflow.com/questions/18826147/javascript-audio-play-on-click">code</a> from this website.</p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Audio&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;script&gt;
  function play(){
  var audio = document.getElementById("audio");
  audio.play();
  }
  &lt;/script&gt;
  
  &lt;input type="button" value="PLAY"  onclick="play()"&gt;
  &lt;audio id="audio" src="./207.wav"&gt;&lt;/audio&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The .htaccess:</p>
  
  <pre><code>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
  </code></pre>