From the jQuery manual:
jQuery uses the browser .innerHTML property to parse the extracted document and paste it into the current document. During this process, browsers often filter elements from the document, such as <html> , <title> or <head> elements. As a result, the elements obtained using .load() may not be as if the document were received directly by the browser.
Therefore, you should use $.get() to extract the HTML instead of $.fn.load()
source share