0

I am loading a pure HTML code from a AJAX get request and appends it into a div using JQuery. In IE this process is quite slow. I used several method to speed this up but it does not have a major impact on IE.

So alternative is to load this content via IFrame. Iframe is rendered by browser and hence can be faster as compared to AJAX.

What are your thoughts guys?

Artem Barger
  • 40,769
  • 9
  • 59
  • 81
goodsanket
  • 13
  • 4
  • What exactly make you think that once browser render iframe it might be faster? – Artem Barger Aug 17 '10 at 06:52
  • Check out this Google Tech Talk on High Performance Websites. It may be able to help: http://www.youtube.com/watch?v=BTHvs3V8DBA Do you know exactly where the slowness is coming from? How many requests does your HTML code have to make for images and other elements after AJAX receives it? – Chris Aug 17 '10 at 07:30
  • @Artem Barger Well, I think that browser renders HTML faster then javascript way, because Javascript will have to insert elements into DOM on the fly which can make it a bit slower. This is a thought which came in my mind. @chris there are a lot of elements which are getting inserted. I am trying to reduce number of elements by using CSS sprites and removing unwanted div's. Till this time I was thinking IE taking long time to insert elements into div, but there are a lot of "img" tags in my HTML. I am removing all the img tags and replacing it with CSS Sprites. Will this work? – goodsanket Aug 17 '10 at 09:42

1 Answers1

0

I would suggest you to check how long takes to prepare result on back end. Then to check how long takes to get response on client and then compare. Probably there is a latency while you appending response into a div. Only after you will make those checks it could be clear which one is preferable.

Artem Barger
  • 40,769
  • 9
  • 59
  • 81
  • As far is back end is concerned, it is quite optimized. I am even sending gzipped content from server so as to get quick response from server. – goodsanket Aug 17 '10 at 09:44