How do I prevent the browser from preloading the <video> tag?
<p>I have written a user script extension for Chrome with JavaScript in order to prevent video and audio tags from downloading automatically on pageload <br/></p>

<p>This is the code:</p>

<pre><code>var videoTags = document.getElementsByTagName("Video");
var i;
for(i=0; i&lt;videoTags.length; i++)
{
    videoTags[i].setAttribute("preload", "none");
    videoTags[i].removeAttribute("autoplay");
}

var audioTags = document.getElementsByTagName("audio");
var i;
for(i=0; i&lt;audioTags.length; i++)
{
    audioTags[i].setAttribute("preload", "none");
    audioTags[i].removeAttribute("autoplay");
}
</code></pre>

<p>And this is the manifest.json file:</p>

<pre><code>   {
      "content_scripts": [ {
      "exclude_globs": [  ],
      "exclude_matches": [  ],
      "include_globs": [ "*" ],
      "js": [ "script.js" ],
      "matches": [ "http://*/*", "https://*/*" ],
      "run_at": "document_start"
   } ],
      "converted_from_user_script": true,
      "description": "",
      "key": "an2xaeZJluPfnpmcsHPXI4aajQPL1cBm5C2kKjaQwXA=",
      "name": "test.user.js",
      "version": "1.0"
  }
</code></pre>

<p>The problem is that my script runs after a moment and until then the browser (Chrome) downloads a part of video/audio file.</p>