Web page redirection

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
szms
Forum Contributor
Posts: 101
Joined: Thu Jun 26, 2003 12:23 pm

Web page redirection

Post by szms »

Please take a look of the fllowing web site.

http://www.cs.smu.ca/

Can you tell be how the above web page redirected to the following web page?

http://www.stmarys.ca/academic/science/compsci/
User avatar
delorian
Forum Contributor
Posts: 223
Joined: Sun May 04, 2003 5:20 pm
Location: Olsztyn, Poland

Post by delorian »

Code: Select all

<html>
<head>
  <meta http-equiv="Refresh" content="0;URL=http://www.stmarys.ca/academic/science/compsci"> 
</head>
<body>
If you are not automatically forwarded click <a href="http://www.stmarys.ca/academic/science/compsci">here.</a>
</body>
</html>
Stop -> View Page Source. :D
szms
Forum Contributor
Posts: 101
Joined: Thu Jun 26, 2003 12:23 pm

Post by szms »

Please try the following web site.

http://www-usa.cricket.org/homepage/index98.html

After opening the web site please click
"News" or "Bulletin" under HEADLINES.

You will found a new page(for advertisement) for a while and then you get the orgianal page.

Do they use the same META for that advertisement and do they set timer for that new page (for advertisement) so that it will stay according to the time unless the skip button is being clicked.
Nay
Forum Regular
Posts: 951
Joined: Fri Jun 20, 2003 11:03 am
Location: Brisbane, Australia

Post by Nay »

You can use Javascript to set a time.

Code: Select all

<script language="javascript" type="text/javascript">
<!--

function go() &#123;
window.location = "newpage.html";
&#125;

setTimeOut(go(), 3000);

//-->
</script>
3000 is 3 seconds. I'm not sure if it'll work 100% - I just wrote it down on the spot.

Hope that helps,

-Nay
User avatar
delorian
Forum Contributor
Posts: 223
Joined: Sun May 04, 2003 5:20 pm
Location: Olsztyn, Poland

Post by delorian »

szms wrote:
Do they use the same META for that advertisement and do they set timer for that new page (for advertisement) so that it will stay according to the time unless the skip button is being clicked.
Yes, they use the same META:

Here's what I've got viewing the page source of that advertisement.

Code: Select all

<head>
<title>CricInfo</title>
<META HTTP-EQUIV="Refresh" CONTENT="06;URL=http://www-usa.cricket.org/link_to_database/ARCHIVE/CRICKET_NEWS/2003/SEP/261590_CI_22SEP2003.html">
<script language=javascript>
var transad_clickthru="/adlib/clickthru.cgi/0cd55015a758?referrer=/homepage/index98.html";
var newurl="http://www-usa.cricket.org/link_to_database/ARCHIVE/CRICKET_NEWS/2003/SEP/261590_CI_22SEP2003.html";

function cricinfo_interstitial_clickthru() &#123;
  open(transad_clickthru);
  location.href=newurl;
&#125;

</script>
</head>
And of course user Nay gave another possibility to do this.
Post Reply