![]() |
Warning about PDF resource - Printable Version +- Atozed Forums (https://www.atozed.com/forums) +-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html) +--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html) +---- Forum: English (https://www.atozed.com/forums/forum-16.html) +----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html) +----- Thread: Warning about PDF resource (/thread-1061.html) |
Warning about PDF resource - cprmlao@hotmail.com - 05-06-2019 Hi, When I use the next code with ModalWindow to download a pdf I am getting the next message in chrome console. The PDF is downloaded but I get the warning. Is there a way to avoid it? Code: IWBase__ED463BD0B.js:4 Resource interpreted as Document but transferred with MIME type application/pdf Code: with IWModalWindow1 do begin Regards, Luiz RE: Warning about PDF resource - Alexandre Machado - 05-08-2019 I can't recreate this. Please ignore. I could recreate it here. I'll investigate why it happens on Chrome and let you know... Kind regards RE: Warning about PDF resource - Alexandre Machado - 05-09-2019 Hi, after some investigation I'm positive that this is a Chrome bug (or at least an unexpected behavior). There is nothing wrong with the call or the headers. All other browsers work just fine too. But more precisely, you can find this thread here, on Chromium bug tracking: https://bugs.chromium.org/p/chromium/issues/detail?id=9891 This is a 10 year old issue which is still open. There are reports from 2009 up to 2018, from people using PHP, ASP.NET, Python, you name it. If you google for "interpreted as Document but transferred with MIME type" you will get around 3K hits. Most developers just ignore it once Chrome devs decided to ignore it as well. So, in short: there is nothing we can do to avoid this. RE: Warning about PDF resource - DanBarclay - 05-09-2019 Running quickly through the info in the link, it appears it depends on what's in the PDF? And/or is intermittent. If so, having control of the PDF might offer a solution for some folks. I can confirm that the PDF's I have show correctly in Chrome as a modal window. At least on this machine. Dan RE: Warning about PDF resource - cprmlao@hotmail.com - 05-10-2019 (05-09-2019, 10:38 AM)Alexandre Machado Wrote: Hi, Ok. I was thinking i was making something wrong. Thank you Alexandre |