1

Fetching JSON data is working fine in Google Chrome but in Internet Explorer 9, the browser shows this instead:

Do you want to open or save the file?

How do I correct this?

Morten Siebuhr
  • 6,068
  • 4
  • 31
  • 43
user941902
  • 11
  • 1
  • possible duplicate of [IE9 prompts user on submission of hidden iFrame](http://stackoverflow.com/questions/9230779/ie9-prompts-user-on-submission-of-hidden-iframe) – Marc-André Lafortune May 14 '13 at 18:46

1 Answers1

0

Does the server set a Content-Type-header? Ex.

Content-Type: application/json

The browser usually knows that application/json (like text/html etc.) isn't for download, but for the browser itself.

If you don't set it, the broser may think it's just a plain text file and offer it as a download to the user.

Morten Siebuhr
  • 6,068
  • 4
  • 31
  • 43