Several methods of front-end web development page redirects

html is redirected by a variety of methods to various network requests to re-set a direction other locations. In the construction site, often encounter situations need to redirect web: sites like adjustments, such as changing the page directory structure, page is moved to a new address, or again, change the page extension, as a result of the application needs. php changed. Html or. shtml, in this case, if not redirect, the user favorites, or search engine database in the old address will only allow access to customer information to get a 404 error page, traffic loss in vain; another example, some registered multiple domain names of websites, but also need to redirect users to access these domain names automatically jump to the main site, and so on.

The first:

<script language="javascript"type="text/javascript"> 
window.location.href="http://shanghepinpai.com"; 
</script>

The second:

<script language="javascript"> 
alert("返回"); 
window.history.back(-1); 
</script>

Third:

<script language="javascript"> 
window.navigate("http://shanghepinpai.com"); 
</script>

Fourth:

<script language="JavaScript"> 
self.location='http://shanghepinpai.com'; 
</script>

Fifth:

<script language="javascript"> 
alert("非法访问!"); 
top.location='http://shanghepinpai.com'; 
</script>

html meta tags in realization

Simply add the following sentence in the head on the line, after the current page to stay 0.1 seconds to jump to the target page

<meta http-equiv="refresh" content="0.1; url=http://jb51.net/">

php achieve

<?php
    header("Location: http://jb51.net/");
?>

A good Web front-end development engineer on the knowledge we must have breadth but also depth, so many large companies paid out even if it is difficult to recruit the ideal front-end development engineer. So how systematic study and practical web front-end technology companies do, for the establishment of a web front-end live class learning buttoned skirts, web front-end figure is seven hundred sixty-seven front, the front end of the middle number is two hundred seventy-three web, web front-end final is zero or two, it wants to connect to digital. Really want to learn can enter, soy sauce, do not waste everyone's time. Now that the focus is not to explain the technology, but more focused on the explanation of the techniques. Technical black and white, only right and wrong, and skill is a matter of opinion.

Guess you like

Origin blog.csdn.net/nnnn1235657/article/details/93779413