Go Back   WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk
Register Blogs FAQ Social Groups CalendarHelp Desk

Reply
 
LinkBack Thread Tools
Old 04-16-2009, 05:53 PM   #1
Warrior Member
 
Join Date: Mar 2009
Location: N.E. USA
Posts: 13
Thanks: 4
Thanked 0 Times in 0 Posts
Default Script help and insight, Please

HI,

On a couple of pages I use this script below to redirect to another site.
I like it as it goes between the </head> and <body tags.
I am actually able to run this with content/ images in the body which gets spidered.
First, will something like this get me the Big Google Slap?
Secondly, I only get a redirect from this and I would like to keep my own URL in the browser window
and then have it break out on the second click.
Obviously I'm no kind of webmaster since I only know enough to get me in trouble. LOL
Is there someone here who can point me in the right direction to,
either alter this so it does what I want it to do, Or another script that would work as I'd like.

Lastly, is it possible to get this to run inside a template (like a main index page) so I can include links to my other site pages.

I've searched for this and can't seem to find a worable solution for it.

Thanks to all who can help.
Cyber

<script>
//Browser redirect Script- © Dynamic Drive ()
//For full source code, 100's more DHTML scripts, and Terms Of Use,
//visit dynamicdrive
var browser_type=navigator.appName
var browser_version=parseInt(navigator.appVersion)
//if NS 6
if (browser_type=="Netscape"&&browser_version>=5)
window.location.replace("/")
//if IE 4+
else if (browser_type=="Microsoft Internet Explorer"&&browser_version>=4)
window.location.replace("/")
//if NS4+
else if (browser_type=="Netscape"&&browser_version>=4)
window.location.replace("/")
//Default goto page (NOT NS 4+ and NOT IE 4+)
else
window.location=". dynamicdrive.com"
</script>
Louis2 is offline   Reply With Quote
Old 04-17-2009, 03:19 AM   #2
Senior Warrior Member
War Room Member
 
mywebwork's Avatar
 
Join Date: Sep 2008
Location: Honolulu, Hawaii, USA & Montreal Canada
Posts: 2,218
Blog Entries: 1
Thanks: 759
Thanked 724 Times in 505 Posts
Default Re: Script help and insight, Please

Where did you get this script? This looks like something I used back in 1997, and it probably is!

This piece of Javacript redirects the user to a specific site based upon their web browser, however it's showing its age. It's setup to trap Netscape 5, Netscape 4 and IE version 4.

The Netscape browser no longer exists, the final version was version 9 released in October 2007.

The current version of Internet Explorer is version 8.

Browsers like Firefox, Opera, Safari and Chrome will execute the last line.

Scripts like this were used to compensate for some vast differences between the way these browsers rendered HTML, you literally ended up building a site exclusively for each browser. This was a royal pain to maintain, to say the least. In the 21st century this is no longer necessary, most browsers render HTML in a similar fashion (although IE still has it's quirks!).

There are many ways to do a redirect, you may want to look for a more modern solution to your problem.

Bill
mywebwork is offline   Reply With Quote
Old 04-17-2009, 07:12 AM   #3
Warrior Member
 
Join Date: Mar 2009
Location: N.E. USA
Posts: 13
Thanks: 4
Thanked 0 Times in 0 Posts
Default Re: Script help and insight, Please

Thank you for the reply, Bill.

I knew it was an antique, but hadn't seen much else that would act the same way other then a basic iframe redirect.

I'll keep searching for another alternative.

Thanks,

Louis
Louis2 is offline   Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk

Tags
insight, script

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 03:35 AM.