Block old browsers

5

Is there any way to block old browsers ? To be more direct: do not let these browsers, such as IE 6 access my site? I searched the internet and found no source on the subject.

    
asked by anonymous 13.02.2016 / 21:44

1 answer

7

You have not tagged

To use include css:

<link rel="stylesheet" href="your_path/outdatedbrowser/outdatedbrowser.min.css">

Include plugin's script at the bottom of the HTML body:

O js:

<script src="your_path/outdatedbrowser/outdatedbrowser.min.js"></script>

Paste the required HTML at the end of your document (see demo examples):

And create this element:

<div id="outdated"></div>

To call use:

//event listener: DOM ready
function addLoadEvent(func) {
    var oldonload = window.onload;
    if (typeof window.onload != 'function') {
        window.onload = func;
    } else {
        window.onload = function() {
            if (oldonload) {
                oldonload();
            }
            func();
        }
    }
}
//call plugin function after DOM ready
addLoadEvent(function(){
    outdatedBrowser({
        bgColor: '#f25648',
        color: '#ffffff',
        lowerThan: 'transform',
        languagePath: 'your_path/outdatedbrowser/lang/br.html'
    })
});

Supported Languages: link

Examples: link

    
13.02.2016 / 22:01