mactro
mactro

Reputation: 518

Problems with IE compatiblity mode and Filereader in intranet

I am designing a website that will run in the company intranet. All computers have IE11. I need to use Filereader for previewing uploaded images, but it's not possible without adding <meta http-equiv="X-UA-Compatible" content="IE=edge" /> However, when I add this tag it completly messes up my css layout. How can I deal with it?

Upvotes: 0

Views: 144

Answers (2)

mactro
mactro

Reputation: 518

Ok, adding <!DOCTYPE> didn't help, but thanks to suggestion from @Roman Canlas, I experimented more with my layout, and switched from <div> style to HTML5 layout, and it finally works.

Upvotes: 0

securecodeninja
securecodeninja

Reputation: 2515

Setting the document to IE=edge places IE into the highest supported document mode and its basically the same as adding DOCTYPE directive in your page, setting it to HTML5 doctype.

But take note that

"...beginning with IE11, document modes are considered deprecated and should no longer be used. Webpages that require legacy document modes to display properly should be rewritten to use features defined by modern standards."

https://msdn.microsoft.com/en-us/library/jj676915%28v=vs.85%29.aspx

So, I wouldn't rely using the x-ua-compatible header and use the

<!DOCTYPE> 

directive instead

You also need to fix your CSS to work with the latest standard rather than trying make it work backwards. If it's getting messed up with the highest supported document mode, then your CSS does not comply.

Finally, IE11 has partial support for the FileReader http://caniuse.com/#search=filereader so technically your FileReader should work fine. Otherwise, you need to investigate what is going on https://msdn.microsoft.com/en-us/library/gg699340%28v=vs.85%29.aspx

Upvotes: 1

Related Questions