json xhr response opens a download file popup window

前端 未结 5 1704
孤街浪徒
孤街浪徒 2021-02-04 08:09

For one of our ajax request (with a .json response) some of our clients have complained that they are seeing a \"File Download\" prompt asking the user to download the .json res

5条回答
  •  梦毁少年i
    2021-02-04 08:21

    try specifying a MIME type of "text/plain" in the response. or just drop the ".json" extension from the url (try .txt, or .js, for instance)

提交回复
热议问题