title: editing the <head> section with javascript
body: <p>I would like to clear the entire <code>head</code> section once the page loads... actually, my goal would be to delete all JavaScript code held in the <code>head</code> section.</p>
  
  <p>Is there some way to do something like this: </p>
  
  <pre><code>document.head.innerHTML = "";
  </code></pre>
  
  <p>Explanation:
  I am using a Python script that uses Qt and webkit to take screenshots of websits.<br>
  It works on most sties, but there is one that it fails on. That site has a bunch of JavaScript code that it runs on timeouts.  The WebKit webpage object allows me to execute JavaScript on the page.  If there is some way to have the JavaScript remove all of the code form the head section I'd like to be able to try that for testing purposes to see if it resolves my screenshot script issue.</p>