Total members 11895 |It is currently Fri Dec 06, 2024 4:13 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





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.



_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  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     -  
 Preloading Images javascript code     -  
 First Visit Pop Up Window javascript code     -  
 Typing Status Bar Text javascript code     -  



Topic Tags

JavaScript Basics
cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com