I'm using jQuery to append DOM elements to a page (not a single page application), just a regular web page. When I append DOM elements to a DIV, such as this:
$("#id").append("<p>somehtml</p>");
And then the user navigates to another page by clicking a link, then uses the native back button on their browser it appended DOM elements are not there. Is there anyway to force the the DOM to be updated and cached by the browser on change?
UPDATE I realize that most everoyne is recommending this question from 2009 (Ajax, back button and DOM updates), however it doesn't hold true today. unload events don't trigger a cache invalidation, and the examples don't even work.