Home > Java > javaTutorial > body text

What does iframe mean in jsp

(*-*)浩
Release: 2020-09-15 14:46:36
Original
4708 people have browsed it

iframe tag, also called floating frame tag, you can use it to embed an HTML document in an HTML display. The biggest feature that is different from the Frame tag is that the HTML file referenced by this tag is not displayed independently from other HTML files, but can be directly embedded in an HTML file and integrated with the content of the HTML file to become a whole. In addition, , you can also display the same content multiple times on a page without having to write the content repeatedly. An image metaphor is 'picture-in-picture' TV.

Recommended course: Java Tutorial.

What does iframe mean in jsp

#iframe is also called an embedded frame. An embedded frame is similar to a frame web page. It can embed the frame and content of a web page into an existing web page.

First of all, its label is written as:

<frameset >
    <frame src= "要连接的页面"></frame>
</frameset>
Copy after login

iframe is used to set a floating frame or container for text or graphics.

frameborder sets the edge width around the picture and text frame
There is also a design for quick reading height
scrolling=no Whether there is a scroll bar (YES, NO, AUTO)
SRC specifies the file or image called by IFRAME (HTML, HTM, GIF, JPEG, JPG, PNG, TXT, *.*)
Iframes blocks page loading

Timely It is very important to trigger the onload event of the window. The onload event triggers to stop the browser's "busy" indicator, telling the user that the current web page has been loaded. When the onload event is delayed, it gives the user the feeling that the web page is very slow.

The onload event of window needs to be triggered after all iframes have been loaded (including the elements inside). In Safari and Chrome, this blocking situation can be avoided by dynamically setting the iframe's SRC via JavaScript.

The only connection pool

The browser can only open a small number of connections to the web server. Older browsers, including Internet Explorer 6 & 7 and Firefox 2, can only open two connections to a domain name (hostname) at the same time. This number limit has been increased in newer versions of the browser. Safari 3 and Opera 9 can open 4 connections to a domain name at the same time, and Chrome 1, IE 8 and Firefox 3 can open 6 connections at the same time. You can view the specific data table through this article: Roundup on Parallel Connections.

Some people may hope that iframe will have its own independent connection pool, but this is not the case. In most browsers, the main page and the iframes within it share these connections. This means that the iframe may use up all available connections when loading resources, thus blocking the loading of the main page resources. This is of course good if the content in the iframe is more important than the content of the main page. But usually, the content in the iframe is not as important as the content of the main page. At this point it's not worth it to run out of available connections in the iframe. One solution is to dynamically set the SRC of the iframe after the important elements on the main page are loaded.

The top 10 websites in the United States all use iframes. Mostly, they use it to load ads. This is understandable and a logical solution, with an easy way to load ad serving. But remember, iframes will have an impact on your page performance. Whenever possible, don't use iframes. Use them sparingly when absolutely necessary.

The above is the detailed content of What does iframe mean in jsp. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
jsp
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template