Reputation: 77
I've got a php MVC website developed in Wamp as test server, which works perfectly fine in Chrome, Opera, Safari and FF. However, whenever I try to open it in IE or Edge, the html gets downloaded as a single file with a random name without extension.
I tried uploading it onto my shared hosting and still get the same issue, changing computers to access the page makes no difference neither.
I've got a feeling I need to declare something somewhere for IE and Edge but have no idea how to approach this... any advice would be appreciated!
UPDATE!!!! For whatever reason I had declared
header('Content-Type: charset=utf-8');
No idea why I declared that but removing this fixed the issue.
Thanks for your help!
Upvotes: 2
Views: 3248
Reputation: 1
<meta charset="utf-8"/>
notice the forward slash at the end. it helped me.
Upvotes: -2
Reputation: 268344
This appears to be an interoperability difference between Microsoft Edge and other browsers. From a cursory glance, I suspect the cause is a missing mime-type. Make sure that when you set the response headers, you state that the document is text/html
.
After some additional testing, it appears as though Chrome and Firefox display the page as HTML while Safari displays the page as plain text. Both IE and Edge appear to download the file instead.
I'll file an issue to have the team evaluate Edge's behavior on grounds of interoperability.
Upvotes: 3