• Register
0 votes
3.7k views

Problem  :

Chrome is not redirecting, nor it is changing my previous page, it is just report the below warning in my console:

“Resource interpreted as Document but transferred with MIME type application/zip.”

The above process works correctly in my Firefox, and also it works fine in Chrome if I directly open the new tab and go directly to the http://0.0.0.0:xxxx/files/download.zip. Am I doing anything wrong here, or is this the bug with Chrome?

7.5k points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

As far as I know, your Chrome was expecting some of the material that it could possibly display (e.g. a document), but it received something which it could not display. This is both the question of how a document was declared at your HTML page level in a href and how it is declared within your server's answer by this means of HTTP headers so this is the question of contract, as opposed to the hope and expectation.

I have experienced that the :

Content-type: application/pdf

Content-disposition: attachment; filename=some.pdf

is just very inconsistent with your:

<a href='some.pdf'>

Here Chrome will definitely cry as Resource interpreted as document but transferred.

Actually, your attachment disposition clearly means that: your browser must not interpret your link, but rather it should store it somewhere for the other purposes. So above, either the download is missing besides the href, or Content-disposition should be removed from the headers.

38.6k points

Related questions

0 votes
1 answer 57 views
57 views
Problem: any help ? Resource interpreted as document but transferred with mime type application/pdf.
asked Mar 6 Wafa Abu Yousef 6.1k points
1 vote
1 answer 148 views
148 views
Problem : With the Chrome 12.0.742.112, if I redirect then the Chrome will not redirect, nor it will change your previous page, it will just report with the below warning in your console: Resource interpreted as Document but transferred with MIME type application/zip. The process ... the http://0.0.0.0:3000/files/download.zip. Am I doing something wrong here, or is this the problem with Chrome?
asked Dec 28, 2019 alecxe 7.5k points
0 votes
1 answer 11 views
11 views
Problem: Give me a solution please : Resource interpreted as document but transferred with mime type application/octet-stream.
asked Jun 12 Aurelia Maja 78.4k points
0 votes
1 answer 3 views
3 views
Problem: Has anyone else had a similar experience : Resource interpreted as document but transferred with mime type?
asked Jun 20 akhi 125k points
0 votes
1 answer 29 views
29 views
Problem: Please, want an answer : Resource interpreted as document but transferred with mime type image/gif
asked Jun 16 asha 121k points
0 votes
1 answer 30 views
30 views
Problem: What exactly is the solution: Resource interpreted as Document but transferred with mime-type application/json?
asked Jun 13 Mezbah 130k points
0 votes
1 answer 208 views
208 views
Problem : I have the below snippet, which currently using the jQuery Form plugin to post the form to the server in the Ajax. var myoptions = { dataType: "json", success: function(data) { alert("My success"); } }; $form.ajaxSubmit(myoptions); My Ajax implementation is ... /json in the Chrome Developer Tools. I want to really find out why the warning is shown, or find a way to quickly resolve it.
asked Dec 28, 2019 alecxe 7.5k points
0 votes
2 answers 675 views
675 views
Problem : I have below problem. Chrome continues to return below error &ldquo;Resource interpreted as stylesheet but transferred with MIME type text/html&rdquo; My files affected by above error are just a Style, chosen and jquery-gentleselect (other CSS files that are imported in a ... without error). I have already checked the MIME type and text/css is already on a CSS. How to resolve my error?
asked Jan 22, 2020 jwilliam 3.9k points
0 votes
1 answer 4 views
4 views
Problem : Is there a method to resolve this issue: Resource interpreted as stylesheet but transferred with mime?
asked Jun 22 Siam55 110k points
0 votes
1 answer 5 views
5 views
Problem: Need to facilitate with this : Resource interpreted as stylesheet but transferred with mime type
asked Jun 21 Sawyer Parviz 168k points