• Register
0 votes
2.9k 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?

6 5 3
7,540 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.

9 7 4
38,600 points

Related questions

0 votes
1 answer 16 views
16 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 118 views
118 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 136 views
136 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 459 views
459 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 42 views
42 views
When I am hosting my application on the IIS server, it shows console errors and my application styles are not working correctly.
asked Feb 10 TeamScript 13.5k points
0 votes
1 answer 80 views
80 views
I have this problem. Chrome continues to return this error
asked Dec 15, 2020 TeamScript 13.5k points
0 votes
1 answer 175 views
175 views
Problem : I have the javascript application and when I try to run it on firefox I am facing the below error on the console: &ldquo;Because its mime type ('text/html') is not a supported stylesheet mime type&rdquo; Now I am completely confused because of this error. Kindly somebody let me know how can I resolve my above error?
asked Jan 29, 2020 jwilliam 3.9k points
0 votes
1 answer 215 views
215 views
Problem : Encountered mime type error and looking for its solution because its mime type ('text/html') is not executable, and strict mime type checking is enabled.
asked Nov 11, 2019 peterlaw 6.9k points
1 vote
1 answer 119 views
119 views
Problem : I am getting mime type error because its mime type ('text/plain') is not executable, and strict mime type checking is enabled.
asked Nov 11, 2019 peterlaw 6.9k points
0 votes
1 answer 29 views
29 views
Problem: I am getting the following error, even if I have jquery-ui in my application.js file the file 'jquery-ui' could not be found (in / home / jeff / jobs / projects / to / media / app / assets / javascripts / application .js: 14) application.js //= require jquery //= require jquery_ujs //= require jquery-ui //= require jquery.validate.min Can anybody help me?
asked Nov 4, 2020 sasha 16.2k points