Search code examples
javascriptjqueryhead

how to get <head> content of the current page with jquery or JS


how to get <head> content of the current page


Solution

  • You could use the javascript DOM API like this:

    var headContent = document.getElementsByTagName('head')[0].innerHTML;