Web page automatic Jump Implementation method PHP, JSP (top) _javascript tips

Source: Internet
Author: User
Typically, the browser receives a Web page that contains code that automatically loads a different page. The page may be converted on the server side, so that the browser receives only one page, and automatic steering often means that the page received by the browser has the ability to automatically send access users to other pages.
The reasonable application of the automatic steering technology includes: Turning the user to the Web page version of the specified browser, changing the domain name of the site to the new domain name, and so on. But now this technology is often used by search engine optimizer as a way to improve the site's search engine rankings. For example, first specifically for the search engine to do a highly optimized page, which is what we usually call the "Bridge page", and then submit this page to the search engine to get a good ranking. However, when the search user clicks the list of pages through the search engine's list of results, it is automatically turned to a Web site address that the user has no intention of accessing. Search engines often think that automatically turning pages are misleading to readers, so it punishes the Web or Web site, but it is not automatically detected for some automatic steering methods.
Meta-Refresh Tag Automatic steering method
Because the search engine can read HTML, and meta&nbsptags is also HTML, so for this automatic steering method, search engines can automatically detect. Therefore, regardless of the purpose of the site's turn, it is easy to be the search engine as a misleading reader to be punished. However, if the jump delay time is set appropriately, the search engine will not regard it as cheating.
The page timed refresh meta-tags (meta refresh Tag) can only be placed in the <HEAD> area of the HTML code. As shown below:
Code
Copy Code code as follows:
<meta http-equiv= "Refresh" content= "5" url=http://www.jb51.net/">


The "5" is to tell the browser to automatically jump to the Page.htm page after 5 Seconds of loading the page. This approach can often be seen in forums. If you send a message on the forum, you will first see a confirmation page, which will automatically bounce back to the current forum page in a few seconds.
From the perspective of Search engine optimization, generally do not want to automatically turn to have a delay. However, if you are using the Meta Refresh logo for steering, be sure to set the delay time at least 10 seconds.
"JavaScript" Automatic steering method
Because JavaScript cannot be parsed, the search engine is unable to detect (automatically detect) automatic steering with JavaScript scripts. JavaScript automatic redirection script can be placed in any location on the Web page, if you want to jump immediately, you can put it into the source of the Web page of the top Programme 1:
Code
Copy Code code as follows:

<script language= "JavaScript" >
<!--
Location.replace ("Http://www.jb51.net");
-->
</script>

The advantage of automatic redirection with JavaScript is that the target URL that the user accesses is not kept in the user's browser's history, and if the user returns by pressing the return button, it will go back to the page before the jump instead of the jump page that contains the JavaScript automatic redirection script. So it doesn't appear that when the user clicks the return button and returns to the redirect page, the page automatically jumps to the embarrassing situation where the user would have wanted to leave the page.
If necessary, you can place the JavaScript automatic redirection script in an external file and load it through the following command line, where "filename.js" is the path and file name of the external file:
Code
<script language= "javascript" src= "Filename.js" ></script>

Note: If you need to implement an immediate turn, or do not want people to see the page before the turn, generally use JavaScript script implementations. In this case, the JavaScript script should be placed in the <HEAD> area of the HTML source code.
form (form) automatic steering method
Search engine "Crawl" programs will not fill out the form, so they will not notice the submission form, so you can use the form to achieve automatic redirection (redirect) without the search engine to detect.
For a form, people rarely realize that the URL address that is included in the action parameter of the form is exactly the URL that the browser requests to the server. The browser will give it a special treat by adding some formatting to the requested URL address to the Name=value parameter. In the absence of anything, the browser will still schedule the request to the server for the URL.
JavaScript scripts allow you to submit a form when the page starts to load. Here's an example of using JavaScript to implement form autocommit and submitting a form:
Code
Copy Code code as follows:

<script language= "javascript" ><!--document.myform.submit ()//--> </script>
<form name= "MyForm" action= "http://www.jb51.net" method= "Get" ></form>
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.