Forums

edge browser shows "what would you like to do with" for my page

When I browse to my Pythonanywhere page with Firefox or Chrome, it works fine, but with Microsoft Edge it shows a dialog "what would you like to do with XXX" and downloads rather than shows the page.

Is it something I have set up wrong ? HTML headers ?

Cheers in advance.

Hi- I don't think that that should be an issue- are you sure it's not some caching issue (eg: you used microsoft edge previously before your webapp was setup and it remembered the results)

If not, could you perhaps open the browser dev tools and go to the network part and see what the headers etc are?

Thanks for your super fast reply !

The current page is in the file that it downloads, so I don't think it's remembering a bad page.

I cannot get to the headers, because the "what would you like to do with XXX" dialog prevents the developer tools section showing anything for the page. Any idea on how to get to them ?

The file that downloads begins:

" <!DOCTYPE html>

<html lang="en">

<head> "

could you email us at support@pythonanywhere.com with a screenshot of what you are seeing?

It is an unfixed bug / incompatibility in Edge.

I am using Django and the workaround was to put the Context-Type in my response:

response = render_to_response( 'xxx.html', context_dict, context )

response[ "Content-Type" ] = "text/html; charset=utf-8"

Thanks for the help Conrad.

Thanks for posting the solution! Hopefully it'll help out if anyone else has the same problem.