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

1 vote
1 answer 88 views
88 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
2 answers 357 views
357 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 95 views
95 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
1 answer 10 views
10 views
I have this problem. Chrome continues to return this error
asked Dec 15, 2020 TeamScript 11.1k points
1 vote
1 answer 47 views
47 views
Problem: I have written a very simple application. Please find below the code for my simple application which is calling the API in each second. After each of the call a chrome memory allocation size for that particular tab increases continuously. But not by the reducing that memory. ... xhttp.send();     } </script> </body> </html> Kindly help me in finding out the root cause of this issue.
asked May 27, 2020 Martin K 6.6k points
0 votes
1 answer 1.6K views
1.6K views
Problem : I am trying to build the Google Chrome extension. I searched on every platform and took every step to resolve my below error &ldquo;Your file was not found it may have been moved or deleted. err_file_not_found&rdquo; I have done everything that I could , but ... \User Data**),like the other extensions my extension also has no folder. Please let me know how to fix the extension issue.
asked Jan 22, 2020 jwilliam 3.9k points
0 votes
2 answers 1.1K views
1.1K views
Problem : I am very new to chrome extension development. The issue which I am facing is not related to accessing the chrome:// url but I do not want to edit anything there, now the issue is regarding the execution of the chrome.tabs.executeScript() which I am using ... fine when used alone in a html file. The main aim of my extension is to provide auto complete while writing in a text field.
asked Nov 21, 2019 peterlaw 6.9k points
0 votes
1 answer 241 views
241 views
Problem : Facing following chrome error error in event handler for (unknown): typeerror: cannot read property 'indexof' of undefined
asked Nov 16, 2019 peterlaw 6.9k points
0 votes
1 answer 19 views
19 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 6.4k points