Internet Explorer (IE) is an old browser which is hardly used now a days for normal people but there are conditions where some companies are using old ERPs or CRMs which are only accessible via IE. While developing web apps now a days and keeping them compatible with IE is a huge problem. One of the problems I recently faced was automatically allow blocked content on Internet explorer. I’m sure you must have seen the following yellow bar quite sometime in your website.
It mostly appeared for developer while testing from their local machine. After struggling I found out that Microsoft introduced something called “Mark of the Web” which was to enhance the security on Internet Explorer. Because of this MOTW, these pop-ups appear to give full control to users to allow or block the contents. Usually AJAX calls or Javascripts were blocked to stop security injection.
To overcome this, you simply need to add the following code in your code, before the <html> tag:
<!-- saved from url=(0014)about:internet -->
The numbers in there shows the length of the address you want to allow Internet Explorer to add in the security feature. If you are putting up http://localhost, then that is 16 characters long, so your numbers would be (0016). Similarly if you are adding a complete URL, you can add the total length of the URL in there.
For more information on this, you can visit this stackoverflow thread or Microsoft document here.