Advanced Search

Results 1 to 3 of 3

Thread: refuse browser script

  1. #1
    Join Date
    May 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default refuse browser script

    hi im trying to find a script for my site that will refuse brouser access unless its firefox? if thats not possible at least getting a script that will refuse ie would be great thanks guys

  2. #2
    Join Date
    May 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    it has to be something like this right ?
    Code:
    <script language="javascript">
    function scan() {
    	var ver=navigator.appVersion;
    	var isMSIE = (!(window.opera) && ver.indexOf("MSIE") != -1) ? 1 : 0;
    	if (isMSIE) {
    		alert("This link will not work in Internet Explorer");
    	} else {
    		if (pluginversion == 2) {
    			updatewindow("0", "http://mysite.com/thispage.php");
    		} else {
    			updatewindow("0", "http://mysite.com/thispage.php");
    		}
    	}
    	return false;
    }
    </script>

  3. #3
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    You can detect the browser version with JavaScript and display browser-specific content, but the question is why would you want to? Firefox doesn't have the market share of IE. By disabling your site to IE, you're alienating 60+ percent of Internet users...is that something you really want?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •