iframe advantages and disadvantages?

iframe advantages:

1.iframe intact able to embed web pages to show up.

2. If there are multiple pages referenced iframe, then you only need to modify the contents of the iframe, to change the content of each page can be achieved calls, convenient and quick.

3. If the web page in order to unify style, head and versions are the same, you can write a page with iframe to nest, you can increase code reusability.

4. If you are experiencing slow loading of third-party content such as icons and advertisements, these problems can be solved by the iframe.

iframe disadvantages:

1. will have a lot of pages, not easy to manage.

2.iframe frame structure can sometimes make people confused, if the number of multi-frame, it may appear up and down, left and right scroll bar will distract the attention of visitors, the user experience is poor.

3. code complexity, not by some search engines to index, it is critical now search engine crawlers can not handle well the content of an iframe, so the iframe would be detrimental to the use of search engine optimization.

4. Many mobile devices (PDA phone) can not be completely displayed frame, equipment compatibility is poor.

5.iframe page framework will increase the http request to the server for large sites is not desirable.

Analyze so much, and now are basically with Ajax instead of iframe, so the iframe has gradually withdraw from the front-end development



Guess you like

Origin www.cnblogs.com/Rivend/p/12600648.html