"Resource interpreted as document but transferred with mime type application/"

Resource interpreted as document but transferred with mime type application/ pdf

by: Kylee L.
Language: English

"Resource interpreted as Document but transferred with MIME type video/mp4" # Closed. binn opened this issue on Jun 19, · 7 comments. Closed. Resource interpreted as document but transferred with MIME type application/json. Client accept header: Accept:application/json, text/javascript, */*; q= “Resource interpreted as Document but transferred with MIME type application/zip.” The above process works correctly in my Firefox, and also it  1 answer.

Having bought a subscription, you can download this or other directories on our website. To download the file, click on the button below.

The believing brain michael shermer

By using our site, you acknowledge that you have read and understand our Cookie Policy , Privacy Policy , and our Terms of Service. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. Chrome will not redirect, nor change the previous page, it'll just report the following warning in the console:. That's the problem. I'm searching to see what the reason could be. Why it wasn't working I'm not entirely sure, but it could have something to do with how Chrome deals with multiple downloads on a page, perhaps it thought they were spam and just ignored them.

I could not find anywhere just an explanation of the message by itself. Here is my interpretation. As far as I understand, Chrome was expecting some material it could possibly display a document , but it obtained something it could not display or something it was told not to display.

This is both a question of how the document was declared at the HTML page level in href see the download attribute in Roy's message and how it is declared within the server's answer by the means of HTTP headers in particular Content-Disposition. This is a question of contract , as opposed to hope and expectation. Actually, the attachment disposition just means this: the browser shall not interpret the link, but rather store it somewhere for other—hidden—purposes.

Here above, either download is missing beside href , or Content-disposition must be removed from the headers. It depends on whether we want the browser to render the document or not. I encountered this same issue today with Chrome Version The headers are correct, express sets them properly automatically, it works in other browsers as indicated, putting html 5 'download' attribute does not resolve, what did resolve it is going into the chrome advanced settings and checking the box "Ask where to save each file before downloading".

After that there was no "Resource interpreted as document I had a similar issue when performing a file download through Javascript. Note I discovered that Firefox requires the link to be appended to the document whereas Chrome will work without it.

It seems that iframe interprets it as a document but it is not. That's why it displays a warning. With this, chrome opens a new tab and loads the PDF without warning even in responsive mode. I had this issue in an ASP web site project. Adding a "Content-Length" header caused downloads to start working again in Chrome. I have updated my Chrome to latest 62 version and it started to showing the PDF again. But the message is still there in the console.

Just ran into this and none of the other information I could find helped: it was a stupid error: I was sending output to the browser before starting the file download.

Surprisingly, I found no helpful errors found like "headers already sent" etc. Hopefully, this saves someone else some grief! In my case the file name was too long, and got the same error. Once shortened below chars worked fine. I got this error because I was serving from my file system. Once I started with a http server chrome could figure it out.

I was experiencing the same trouble with a download manager I created. The problem I was having involved the file name being too long and the extension being clipped off. Solution: Increased the MySQL database field to to store the file name, and performed a length check before saving the blob.

I've faced this today, and my issue was that my Content-Disposition tag was wrongly set. Learn more. Asked 8 years, 11 months ago. Active 2 months ago. Viewed k times. With Chrome Uwe Keim Ashley Williams Ashley Williams 6, 4 4 gold badges 29 29 silver badges 39 39 bronze badges. Active Oldest Votes. That fixes Chrome, but breaks other browsers. My Android phones won't download from that kind of link. And it's , so don't expect it to anytime soon either.

Saeed Neamati Saeed Neamati It's probably also worth pointing out that the zip URL is dynamic in my app, so it's nothing to do with caching. I'm absolutely stumped here, I really am!

What are you talking about? There is no request header in the question. Both of them are response headers. And I am sitting here wondering why this should be an answer but not a comment?

Evan Evan 1, 13 13 silver badges 20 20 bronze badges. Not sure what you are using for that, so it's hard to give more info. What language or framework are you using for your server?

I've fixed this…by simply opening a new tab. What do you mean you "opened a new tab"??? You manually opened a new browser window and pasted the download URL in there?

Yes, exactly. I assumed it was a bug in the application-state of the particular tab. I wouldn't expect the user to open a new tab And I don't find opening one to download a file elegant either.

Joram et. Sweeping under the rug is not s solution. This clearly does not solve the original answer. What would I put in the user doc "copy the url, open a new tab, paste the url, Business down. Hope this helps. Champignac Champignac 4 4 silver badges 5 5 bronze badges. JohnC JohnC 2, 4 4 gold badges 32 32 silver badges 42 42 bronze badges. Elliveny Elliveny 1, 1 1 gold badge 16 16 silver badges 23 23 bronze badges.

Carmela Carmela 6 6 silver badges 13 13 bronze badges. AS Mackay 2, 9 9 gold badges 13 13 silver badges 22 22 bronze badges. I did this and it worked: window. Salisbury R. Salisbury 1, 11 11 silver badges 15 15 bronze badges. This issue was re-appeared at Chrome 61 version. But it seems it is fixed at Chrome Asif Nowaj Asif Nowaj 4 4 bronze badges. Try below code and I hope this will work for you. DefaultPrint ; break; case "PDF": this.

Faraz Faraz 3 3 silver badges 12 12 bronze badges. So to set your header, Java code would look like this Olivier B. Sign up or log in Sign up using Google.

Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. The Overflow The next right thing. Navigation or forgetfulness? On finding purple links in your search. Featured on Meta. We're switching to CommonMark. New post lock available on meta sites: Policy Lock.

Down these mean streets download

Вовсе нет, - ответила Мидж.  - Хотела бы, но шифровалка недоступна взору Большого Брата. Ни звука, ни картинки.

Cinderella stories from around the world

Can we fix "Resource interpreted as Document but transferred with MIME type application/zip" warning in chrome from the front end? Close. Posted by 5 months ago. Can we fix "Resource interpreted as Document but transferred with MIME type application/zip" warning in chrome from the front end? 5 comments. share. This site uses cookies for analytics, personalized content and ads. By continuing to browse this site, you agree to this use. Learn more. Resource interpreted as Document but transferred with MIME type application/zip: THE_FILE_URL. Thanks in advance for any insight. Viewing 2 replies - 1 through 2 (of 2 total) The topic ‘Resource interpreted as Document but transferred with MIME type application/zip’ is closed to new replies.