Good, therefore, my site does not work correctly in Internet Explorer, if the user does not click the "Allow blocked content" button on the first visit. Now I came up with some javascript that detects the browser that opens in the web page and makes a pop-up window that says: “You are in Internet Explorer. Allow scripts and ActiveX controls to be run by clicking“ Allow blocked content ”at the bottom of the page after rebooting Otherwise, the site may not work correctly. " BUT this is the script SO itself, the user can see this only if he clicks it. This is useless now, because it tells the user to click the button only after she has enabled it. My JS:
var isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;
var isFirefox = typeof InstallTrigger !== 'undefined';
var isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;
var isChrome = !!window.chrome && !isOpera;
var isIE = false || !!document.documentMode;
if(isChrome === false && isSafari === false && isFirefox === false && isOpera === false)
{alert('You are in Internet Explorer. Please allow running scripts and ActiveX controls by clicking "Allow Blocked Content" at the bottom of the page upon reload. Otherwise the site may not work correctly.'
);};
I need a way to detect the browser and display the message without any JS or jQuery. Does anyone have any idea?
source
share