How to Hide an Iframe

You can hide an iframe by setting its visibility to hidden in the style sheet. If you set display to none it may not function properly. You can be sure your iframe is hidden if you include the following style specifications:

iframe {
    visibility: hidden;
    position: absolute;
    left: 0; top: 0;
    height:0; width:0;
    border: none;
}

Hidden iframes were used for ajax-like functionality before XMLHttp and the term ajax were born. Iframes are still frequently used for this purpose, since they have the advantage of maintaining browser history. Unfortunately, hidden iframes are also used in injection attacks.

See the rest of the Iframes Tutorial which includes much more information on iframes and how they are used.