I am in a situation where I need to replace the contents of a <head>
element, without replacing the content with what's already there.
My <head>
contains the CSS links, the Meta and the title. These are updated from an ajax call, containing the html, which javascript then replaces it with.
My issue is that I get a FOUC because it is also replacing the already loaded CSS, with that CSS. Is there anyway to have it NOT replace the CSS because it's already there?
My code:
var headHTML; // This gets updated on the ajax call
$('head').html(headHTML);