Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.


    • CommentAuthorhardy
    • CommentTimeNov 5th 2006
     
    I knew a site a long time ago that had a code to redirect people to different source codes of the same page based on their browser. Unfortunately, my brain forgot the URL and the same with my computer (actually, I think I deleted the file... ). Nonetheless, does anyone know any sites that have a similar code?
    • CommentAuthorgilray
    • CommentTimeNov 5th 2006
     
    Here is one code in Javascript.


    <script>
    <!--
    {
    if((navigator.userAgent.indexOf('Win') != -1) &&
    (navigator.userAgent.indexOf('95') != -1))
    { window.location.href="win95.html"; }
    else if(navigator.userAgent.indexOf('Win') != -1)
    { window.location.href="win31.html"; }
    else if(navigator.userAgent.indexOf('Mac') != -1)
    { window.location.href="mac.html"; }
    else { window.location.href="win.html"; }
    }
    //-->
    </SCRIPT>













  1.  
    that one only checks your OS....

    here you go... just change the filenames to the one you whant...


    <script>
    version=parseInt(navigator.appVersion);
    if (navigator.appVersion.indexOf('5.')>-1){
    version=5
    };
    if (navigator.appVersion.indexOf('6.')>-1){
    version=6
    };
    if (navigator.appVersion.indexOf('7.')>-1){
    version=7
    };
    browser='OTHER';
    if (navigator.appName=='Netscape'){
    browser='NS'+version;
    }
    if (navigator.appName=='Microsoft Internet Explorer'){
    browser='MSIE'+version;
    }
    if (navigator.appVersion.indexOf('MSIE 3')>0) {
    browser='MSIE3';
    }
    if(browser == 'NS5'){
    browser='NS6'
    };
    if (browser=='MSIE3') {
    window.location='MSIE3.html'
    }
    if (browser=='MSIE4') {
    window.location='MSIE4.html'
    }
    if (browser=='MSIE5') {
    window.location='MSIE5.html'
    }
    if (browser=='MSIE6') {
    window.location='MSIE6.html'
    }
    if (browser=='MSIE7') {
    window.location='MSIE7.html'
    }
    if (browser=='NS3') {
    w
    indow.location='netcape3.html'
    }
    if (browser=='NS4') {
    window.location='netcape4.html'
    }
    if (browser=='NS6') {
    window.location='netcape6.html'
    }
    if (browser=='NS7') {
    window.location='netcape7.html'
    }
    if (browser=='OTHER') {
    window.location='other.html'
    }
    </script>