Important alert: (current site time 7/15/2013 12:22:37 PM EDT)
 

VB icon

Banning AOL Browser from your site

Email
Submitted on: 5/15/2001 3:03:23 PM
By: Rabid Nerd Productions  
Level: Advanced
User Rating: By 3 Users
Compatibility: JavaScript
Views: 11244
author picture
(About the author)
 
     This script force-opens IE for AOL users when they visit your site. I have used this on my employer's website (WinDough.com) and on my website (7-10.com).. It is better suited with a scripting language like ASP or ColdFusion, where the script can be set to automatically open the intended page for the user..

If you have ColdFusion, I have pre-developed this to go into an application.cfm conditional include. This script can also be seen and tested (simulating AOL Browser in IE) at http://www.7-10.com/banning_aol.cfm

May cause AOL complaints, but with over 2.6 Million members, we at WinDough.com have not received any we could not work around.. And our traffic is hitting new records, not dropping..

It even opens IE AUTOMATICALLY for AOL 5.5 (maybe 6.0?) users using an ActiveX loophole :)

 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.
				
'**************************************
' Name: Banning AOL Browser from your site
' Description:This script force-opens IE for AOL users when they visit your site. I have used this on my employer's website (WinDough.com) and on my website (7-10.com).. It is better suited with a scripting language like ASP or ColdFusion, where the script can be set to automatically open the intended page for the user..<br><br>
If you have ColdFusion, I have pre-developed this to go into an application.cfm conditional include. This script can also be seen and tested (simulating AOL Browser in IE) at <a href="http://www.7-10.com/banning_aol.cfm">http://www.7-10.com/banning_aol.cfm</a><br><br>
May cause AOL complaints, but with over 2.6 Million members, we at WinDough.com have not received any we could not work around.. And our traffic is hitting new records, not dropping..<br><br>
It even opens IE AUTOMATICALLY for AOL 5.5 (maybe 6.0?) users using an ActiveX loophole :)<br>
' By: Rabid Nerd Productions
'
' Assumes:If you have ColdFusion, I have pre-developed this to go into an application.cfm conditional include. This script can also be seen and tested (simulating AOL Browser in IE) at http://www.7-10.com/banning_aol.cfm
'
' Side Effects:May cause AOL complaints, but with over 2.6 Million members, we at WinDough.com have not received any we could not work around.. And our traffic is hitting new records, not dropping..
'
'This code is copyrighted and has' limited warranties.Please see http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=2179&lngWId=14'for details.'**************************************

<script language="JavaScript">
var AOLBrowser = (navigator.userAgent.indexOf('AOL') != -1);
if (AOLBrowser){
if (window.screen) {
var showheight = screen.availHeight - 170;
var showwidth = screen.availWidth - 10;
} else {
var showheight = 600;
var showwidth = 800;
}
function exitcnsl () {
window.open("http:\/\/www.7-10.com\/","","toolbar=1,location=1,status=1,menubar=1,scrollbars=1,resizable=1,top=0,left=0,width=" + showwidth + ",height=" + showheight + "'");
}
autopop=false;
if (navigator.appVersion.indexOf("5.5",1) > 0) autopop = true;
if (navigator.appVersion.indexOf("6.0",1) > 0) autopop = true;
if (autopop){
window.open ("about:<html><script language=\"JScript\">function closeit () {window.close(); } <\/script> <body onload=\"setTimeout(\'closeit()\',1000);\"> <OBJECT ID=\"WebBrowser1\" WIDTH=200 HEIGHT=120 CLASSID=\"CLSID:8856F961-340A-11D0-A96B-00C04FD705A2\"><PARAM NAME=\"ExtentX\" VALUE=\"8784\"><PARAM NAME=\"ExtentY\" VALUE=\"7303\"><PARAM NAME=\"ViewMode\" VALUE=\"1\"><PARAM NAME=\"Offline\" VALUE=\"0\"><PARAM NAME=\"Silent\" VALUE=\"0\"><PARAM NAME=\"RegisterAsBrowser\" VALUE=\"1\"><PARAM NAME=\"RegisterAsDropTarget\" VALUE=\"0\"><PARAM NAME=\"AutoArrange\" VALUE=\"1\"><PARAM NAME=\"NoClientEdge\" VALUE=\"1\"><PARAM NAME=\"AlignLeft\" VALUE=\"0\"><param name=\"location\" value=\"about:<script>document.write(\'Close this window to open our site in IE...<br>If this does not work, please open IE yourself to visit our site...\');function exitcnsl ()	 {window.open(\'http:\/\/www.7-10.com\/\',\'\',\'toolbar=1,location=1,status=1,menubar=1,scrollbars=1,resizable=1,top=0,left=0,width=" + showwidth + ",height=" + showheight + "\');}</scr" + "ipt><body onunload=\'exitcnsl()\'></b" + "ody></h" + "tml>\"></OB" + "JECT></b" + "ody></h" + "tml>","","toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,top=0,left=0,width=300,height=150");
}
if (autopop){
document.write('<\/head><body onunload=\"exitcnsl();\">Close this window to view our site with IE');
}else {
document.write('<\/head><body>');
}
} else {
// This user does not have AOL...
}
</script>


Other 2 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
5/15/2001 3:16:27 PMHerb Riede (Author)

I tried to JavaScript it down.. But the AOL Browser detection may not work on Windows?? You may need to test for AOL browser some other way or with server-side script (to output dynamically created javscript and you can search for AOL in the cgi.http_user_agent variable) which is suggested anyways..

If you know this method of AOL Javascript detection works on the Windows platform, or know of a method that does, please post..
(If this comment was disrespectful, please report it.)

 
5/15/2001 3:17:26 PMLee Trager

Nice code. Down with AOL!
(If this comment was disrespectful, please report it.)

 
5/15/2001 3:18:26 PMHerb Riede (Author)

Relevant examples of detecting an AOL Browser can be obtained from: http://www.macromedia.com/support/dreamweaver/ts/documents/aol_detection.htm#ex2 -- http://www.macromedia.com/support/dreamweaver/ts/documents/aol_detection.htm#ex2
(If this comment was disrespectful, please report it.)

 
5/29/2001 11:37:04 PMHerb Riede (Author)

According to webmasterinfo.aol.com, the Javascript AOL Browser detection _should_ work even on Windows.
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.