I am dynamically loading iframes into a div. Those iframes need jQuery for their functionality. To avoid including jQuery into every single iframe I simply referenced jQuery in the iframe generator(the same code will be in the head of every iframe loaded) like so:
var jQuery = window.parent.$; // The parent is the document that will house the iframes
var $ = jQuery;
This works just fine in Chrome and a substantial performance boost comes with loading jQuery only once. However both Firefox and IE start leaking memory like mad(both peak around 1gb of memory used) before throwing an out of memory error and dropping the script.
EDIT: jQuery 1.7 and jQueryUI 1.10.3(however jqUi is not used when loading the iframes)