开发者

How to stop browser to download "application/json" AJAX response as a file

My firefox downloads the JSON response of an AJAX call as a file. It's suppose to be handled by the JavaScrip开发者_StackOverflow社区t i.e. JSON object. Can anyone explain how to stop this behavior or there is something I am missing.

Thanks.


Your code may be making a regular POST instead of an xhr call.


If you mean calling a script that returns plain JSON directly from Firefox JsonView is a nice Plugin for viewing JSON responses in Firefox.


I had the same issue. The problem was not related to the ajax, but the code later on. After ajax javascript was redirecting the browser to the same url. And firefox suggest you to open json response as a file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜