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.
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.
You have not tagged javascript tag, but there are some interesting projects which can help you:
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