html - Performance differences between iframe hiding methods? -


is there major performance difference between following:

<iframe style="visibility:hidden" />  <iframe style="width:0px; height:0px; border:0px" /> 

i'm using hidden iframe pull down , parse information external server. if iframe attempts render page, may suck lot of cpu cycles. of course, i'd ideally want raw markup - example, if prevent iframe loading img tags, perfect.

i think either way iframe going load it's contents. can simple test hiding , showing iframe page takes while load.

if iframe (when made visible) shows long loading page, you'll know loaded in before show.

if you're using firebug can use @ http requests made. show whether there's http request made iframe.

as far performance differences, doubt there's between 2 pieces of html posted. if i'd setting visibility hidden more "efficient" since browser doesn't have wory rendering visually, if 0*0px.

still, don't think there's real performance difference , no major performance differences.

update:

i tested in firebug see if iframe still loads contents when set visibility:hidden, display:none; , it's height , width attributes set 0px , in cases, iframe contents loaded.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -