I have this:
<div class="upload_slide">
<iframe class="upload_iframe" style="visibility:hidden;"></iframe>
</div>
If I then post some files to the iFrame and set .upload_slide
to display:none;
, while it's loading, will this affect the loading of the iFrame or the detection of when it finished loading?
As far as I am aware, it should work fine. I've been using hidden iframes to load stuff for a while and haven't had any issues.
That said I know that some browsers try to be efficient by not loading images that are hidden, so it's possible that some browsers (particularly mobile ones) do the same with iframes.
No, the iFrame's loading and load detection should not be compromised by setting the display to none.
CSS is just for style, it has no ability to affect the DOM.
Firefox currently does have an issue with display:none:
Link
There shouldn't be a problem but if there is, a good trick can be to move the element offscreen rather than hiding it. You can create a class like
which you can add and remove as needed.
Nope.. Not at all..
CSS -
display:none
orvisibility:hidden
only says the browser to not to show the iframe content to user.But the functionality will work fine without any issues.