code: function copyHead(headHtml, doc) {
          var head = doc.getElementsByTagName('head')[0];
  
          if (head.innerHTML == headHtml) {
              // the content is already correct
              return;
          }
  
          jQuery.init(head).empty();
  
          appendHTML(headHtml, head);
      }
docs: Copies the given HTML as the content of the current document's <head>
  element. If the current document's head already contains identical
  markup, copying is skipped. <script> elements are omitted.