Skip to content

Commit 308d0d8

Browse files
committed
updated page-redirection.js
1 parent 6ef4c26 commit 308d0d8

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//A redirect is when a web page is visited at a certain URL, it changes to a different URL.
2+
//This can be done for many reasons like moving your domain to a new one or You have built-up various pages based on browser versions or their names or may be based on different countries.
3+
//Most popular way to redirect to another webpage using JavaScript is location.href and location.replace
4+
5+
function Redirect() {
6+
window.location = "https://www.google.com";
7+
}
8+
9+
//For an auto refresh you would use the following script
10+
11+
function AutoRefresh( t ) {
12+
setTimeout("location.reload(true);", t);
13+
}
14+
15+
//Please look at the page-redirect.md file to see where you would include these scripts

0 commit comments

Comments
 (0)