Switch to full style
HTML,DHTML,Javascript,XML,CSS
Post a reply

Redirect to a New Page javascript code

Sun Oct 19, 2008 11:36 pm

If you need to redirect visitors to a new page, the following redirect code will enable you to do just that.

There are many reasons for using a redirect code within your web page. However, the most popular reason is to redirect visitors to a new web page when you've changed the location of the original web page. If you don't, your visitors will receive an error page, which will cause them to leave your web site and probably never return.

Another good reason to use a redirect code within a web page that has moved is the Search Engines. When you create your web site and upload it to your web server, chances are, your pages will be quickly indexed by the Search Engines, as many Search Engines continually crawl the Internet in search of new web pages. If you don't use a redirect code to redirect your Search Engine visitors to your new web page, you may lose these visitors forever.

This is why using a redirect code is so important, as it will enable you to redirect your visitors to the web page they were in search of. This will in turn keep you from losing your visitors.

Note: When using redirect codes within your web page, please make sure you aren't using this redirect code for unethical purposes, such as trying to trick the Search Engines into ranking your web page higher. This action could get your web site banned. Please ensure you use only ethical means in which to obtain web site traffic.

Place the following code between your HEAD tags.
Code:
<SCRIPT LANGUAGE="JavaScript">
<!--
 Script courtesy of http://www.web-source.net - Your Guide to Professional Web Site Design and Development
window.location="http://www.yourdomain.com/";
// -->
</script>

Edit the web address indicated in bold to suit your needs. This is the web address your page will be redirected.



Post a reply
  Related Posts  to : Redirect to a New Page javascript code
 Back to previous page javascript code     -  
 redirect to another page     -  
 How can i redirect to a one servlet from a two jsp page?     -  
 redirect page based on user selection radio button     -  
 go to previous page using JavaScript     -  
 Call PHP code from JSP Page     -  
 Javascript code with Unity3D     -  
 First Visit Pop Up Window javascript code     -  
 Preloading Images javascript code     -  
 Status Bar Link Description javascript code     -  

Topic Tags

JavaScript Basics