So, as the framework of the WordPress webmaster should be how to prevent others to embed the framework?
In fact, to prevent others frame your site is also very simple. Just a simple code can be implemented, the code is as follows:
The code is as follows |
Copy Code |
<script language= "JavaScript" > if (self!= top) top.location.href = Window.location.href; </script> |
The role of this JS statement: To prevent their own web page by the human frame, Top.location.href is the top of the address, Windows.location.href is its own address. Prevent others from embedding your Web site directly in the following way.
The code is as follows |
Copy Code |
<iframe src= "http://ssmay.com" ></iframe> |
This way, even if someone frames your site (such as a theme demo station), the user clicks on the frame link and will really jump to your site. In this way, you can bring direct traffic to your site. If you're in the same situation, try it.