Resource interpreted as Document but transferred with MIME type application/pdf: "http://samplepdf.com/sample.pdf". #579

Closed
rkahar opened this Issue Apr 30, 2013 · 5 comments

Comments

Projects
None yet
6 participants
@rkahar

rkahar commented Apr 30, 2013

When I click Your 18th Tips & tricks - Open PDF (inside iframe)
Google chrome doesn't show pdf file on inspecting console there is error like following :

Resource interpreted as Document but transferred with MIME type application/pdf: "http://samplepdf.com/sample.pdf".
Please resolve this problem

fancybox

@JFKDIAZ

This comment has been minimized.

Show comment
Hide comment
@JFKDIAZ

JFKDIAZ May 3, 2013

I am not sure about the cause but as a workaround you can disable the iframe preload like

$(".fancybox").fancybox({
    openEffect  : 'none',
    closeEffect : 'none',
    iframe : {
        preload: false
    }
});

See http://jsfiddle.net/vstjw/
It seems like IE also behaves the same way.

JFKDIAZ commented May 3, 2013

I am not sure about the cause but as a workaround you can disable the iframe preload like

$(".fancybox").fancybox({
    openEffect  : 'none',
    closeEffect : 'none',
    iframe : {
        preload: false
    }
});

See http://jsfiddle.net/vstjw/
It seems like IE also behaves the same way.

@fancyapps

This comment has been minimized.

Show comment
Hide comment
@fancyapps

fancyapps Jun 14, 2013

Owner

Yes, @JFKDIAZ is right. I have updated the example.

Owner

fancyapps commented Jun 14, 2013

Yes, @JFKDIAZ is right. I have updated the example.

@fancyapps fancyapps closed this Jun 14, 2013

@refractalize

This comment has been minimized.

Show comment
Hide comment
@refractalize

refractalize Feb 7, 2014

Hi,

I'm still seeing that problem, even with preload: false.

I'm using latest fancybox (2.1.5). Even the jsfiddle above (http://jsfiddle.net/vstjw/) still exhibits the "Resource interpreted as Document" behaviour. Any ideas?

Hi,

I'm still seeing that problem, even with preload: false.

I'm using latest fancybox (2.1.5). Even the jsfiddle above (http://jsfiddle.net/vstjw/) still exhibits the "Resource interpreted as Document" behaviour. Any ideas?

@vkeziah

This comment has been minimized.

Show comment
Hide comment
@vkeziah

vkeziah May 28, 2015

I do have the same issue with IE even I use preload: false , sometimes it loads but sometimes it stuck , not sure what is the problem , when it stuck I do close iframe and again If I try to open it loads , very strange behavior in IE .

Any Ideas ?

vkeziah commented May 28, 2015

I do have the same issue with IE even I use preload: false , sometimes it loads but sometimes it stuck , not sure what is the problem , when it stuck I do close iframe and again If I try to open it loads , very strange behavior in IE .

Any Ideas ?

@useug

This comment has been minimized.

Show comment
Hide comment
@useug

useug Apr 8, 2017

ss

useug commented Apr 8, 2017

ss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment