title: In Google Chrome, Google Docs can control headers and footers from javascript. Does anybody know how this is achieved?
body: <p>That's basically it. Somehow, the javascript in Google Docs can turn off the default headers and footers showing the URL, date, page numbering, etc.</p>
  
  <p>This only works in Google Chrome. When Google Docs is running from another browser it will print the headers/footers unless removed manually through the print configuration dialog. In Safari, it seems to generate a PDF server-side which of course will print outside of the browser.</p>
  
  <p>I've searched around the web and have found nothing on how this is done. The javascript in the page is of course minified and obfuscated so it's difficult to get any insights from there.</p>
  
  <p>So before I'm forced to dive into that spaghetti, I'd like to know if anybody has any ideas of how this is done.</p>