This tutorial shows to remove update banner that appears in outdated IE browsers. Such kind of banner may appear in outdated versions of IE. It may have different layout, as it depends on code used for the banner:
- Location of the file where the code is added depends on the template and its type.
We are going to search the appropriate code through all template files.
Download and install editor that allows searching code in multiple files. We are going to use Notepad++ software.
Open the editor and press CTRL+F in order to open a search dialog. Open Find in Files tab.
Select folder where the template files are located. Make sure that template files are unzipped. We have selected folder with theme files:
In Find what field you should specify ie6 keyword. Make sure that you have the same options as on the screenshots. Click on Find All button:
Editor will show up the list of files with ie6 keywords. You should look for code that has conditional comments like <!–[if lt IE 8]>. Please note that another version of IE can be specified in comments. That’s normal:
Open the file and make sure that code relates to the banner. Remove this code. In our case code that we have highlighted on the screenshot should be removed:
Save changes and upload modified file to your server.
Please note that structure of files depends on the template and its type. Refresh the page and check your site. We have removed the banner:
Your template may have the following structure of code, it depends on the template:
<!--[if lt IE 8]> <div style=' clear: both; text-align:center; position: relative; z-index:9999;'> <a href="http://www.microsoft.com/windows/internet-explorer/default.aspx?ocid=ie6_countdown_bannercode"> <img src="http://www.theie6countdown.com/images/upgrade.jpg" border="0" alt="" /></a> </div> <![endif]-->
It may have the following structure of code as well:
<!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> <div id="ie6-alert" style="width: 100%; text-align:center;"> <img src="http://beatie6.frontcube.com/images/ie6.jpg" alt="Upgrade IE 6" width="640" height="344" border="0" usemap="#Map" longdesc="http://die6.frontcube.com" /> <map name="Map" id="Map"><area shape="rect" coords="496,201,604,329" href="http://www.microsoft.com/windows/internet-explorer/default.aspx" target="_blank" alt="Download Interent Explorer" /><area shape="rect" coords="380,201,488,329" href="http://www.apple.com/safari/download/" target="_blank" alt="Download Apple Safari" /><area shape="rect" coords="268,202,376,330" href="http://www.opera.com/download/" target="_blank" alt="Download Opera" /><area shape="rect" coords="155,202,263,330" href="http://www.mozilla.com/" target="_blank" alt="Download Firefox" /> <area shape="rect" coords="35,201,143,329" href="http://www.google.com/chrome" target="_blank" alt="Download Google Chrome" /> </map> </div> <![endif]-->
In this case you will need to remove div only, as code specified before banner loads scripts for specific versions of IE.
Feel free to check the detailed video tutorial below: