My client wants to show a banner when the user is using IE 11 but they only want it to show on the page that the user enters on. If they navigate to other pages, it should disappear. And, if they leave the site and come back, it should show the banner again. I have the detecting IE 11 figured out but I don't really know where to start to get the other part working. Any help?
Here's what I have so far:
function isIE(){
return window.navigator.userAgent.match(/(MSIE|Trident)/);
}
//function to show alert if it's IE
function ShowIEAlert(){
if(isIE()){
document.getElementById('ie11-banner').classList.remove("hidden");
}
}