Microsoft Edge won't open my HTML page

In my current web project, I am generating reports based on data entered by a user that opens in a new tab. the report format is also user-defined in pdf or html format. This functionality works great in all browsers including IE7 / 8/9/10. But recently, when I open the same in Microsoft Edge, instead of opening the HTML report in a new tab, it starts downloading the HTML file.

Other menu page redirect links work fine in Microsoft Edge. The only problem is opening these reports in a new tab. Can you guys help me?

+3


source to share


2 answers


As @Diptendu pointed out in the comment, you need to specify a "Content-type" for "text / html" so that the browser knows the content is strictly HTML and should render it accordingly.



+1


source


The browser tries to load the file instead of rendering when it encounters some type of content that it cannot process. In your case, the browser is interpreting an invalid content type and hence trying to load it instead of rendering to a new tab. By specifying "Content-type" as text / html, you can explicitly tell the browser that the content is HTML and should be treated like HTML content.



+1


source







All Articles