title: Load content into a div with same performance as an IFrame
body: <p>Have a issue with performance while injecting a glob of content into a view page. The markup can get rather large. I did a test using an IFrame to load the content from a temp file and directly by setting the html and the performance is much better than using the jquery .load() or html(). However, everything has already been built around loading into a div and I am trying to avoid IFrame.</p>
  
  <p>NOTE : I am making a hunch that there are some operations going on when injecting the content into a dom that you don't get when loading into an IFrame. Similar to if open a 2.5 mb html directly in the browser it loads almost instantly, meanwhile, loading 2.5 mb into a div using jquery doesn't offer the same performance.</p>
  
  <p>Are there any tricks I could use that would allow .load() to perform better?</p>
  
  <p><strong>Edited: Added code:</strong></p>
  
  <p>The question is rather straight forward. I am getting a payload from an ajax call that is either a  url or raw html. I am then using either   </p>
  
  <p><code>element.html(content)</code> </p>
  
  <p>or </p>
  
  <p><code>element.load(content)</code> </p>
  
  <p>based on whether the content is a url or markup. </p>
  
  <p>When I change the element to an IFrame and then use either </p>
  
  <p><code>element.attr('src', content);</code></p>
  
  <p>or</p>
  
  <pre><code>element.contents().find('html').html(content);
  </code></pre>
  
  <p>The content loads much faster.</p>