This story starts with an unexpected discovery today. The company has several websites. There are links between each other in the friend link. I just changed a link and wanted to check it. When I used the webmaster tool to check, I found that my link was not there! It turns out that I put the friendly links in footer.hmtl. Then embed it into the homepage via iframe. In this way, what is detected is not the home page link, but the link to the footer page. The same is true for search engines. Search engines will look at the pages introduced by the iframe and follow the links inside, but they don’t pay much attention to them. And each individual iframe is also treated as a separate page. In fact, this can be found when viewing the source code of the page. You can only see the code of the iframe, but not the code of the page inside. Code Copy code The code is as follows:<div id="foot" class="clear_left"> <iframe src="web/iframe/foot.html" width="960" height="100" align="" frameborder="0" hspace="0" scrolling="no" vspace="0" allowtransparency="1"></iframe> </div> Based on these considerations. There are many places where iframes cannot be used. Although sometimes he is very useful. Iframes are no longer used intentionally. Of course we have to find a way to replace it. The first thing that comes to mind is of course include, and there are many types of include. As for jsp, there are two types: one is the include directive %@include file=""%>, and the other is the jsp action directive: <jsp:include page="" /> The former is suitable for including static files, and the latter is suitable for including dynamic jsp. There is also an ssi instruction that has nothing to do with jsp directly. I only know that this method exists but have never used it. It seems to be parsed by the web server. I don't know the details, if anyone knows please let me know. By the way, I found that Tencent’s website does not use iframe. Many other large websites also use it, such as Sina, Taobao and so on. Looking forward to knowing the solution of qq. |
<<: JavaScript Composition and Inheritance Explained
>>: Teach you how to achieve vertical centering elegantly (recommended)
This article example shares the specific code of ...
After a lot of trouble, I finally figured out the...
How to write Vue foreach array and traverse array...
The fixed IP address of the centos-DVD1 version s...
This article shares the specific code of Vue to i...
Loading rules of require method Prioritize loadin...
The LIKE operator is used in the WHERE clause to ...
Unlike other types of design, web design has been ...
First: Start and stop the mysql service net stop ...
Table of contents 1. What is Function Anti-shake?...
Preface: Vue3 has been released for a long time. ...
Table of contents 1. Security issues with Docker ...
After reading some articles, I finally figured ou...
Windows Server 2008 server automatically restarts...
Table of contents 1. Prototype chain inheritance ...