What's up with Chrome and pdf downloads

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

What's up with Chrome and pdf downloads

Jolle Carlestam-2
When I have Lasso produce and serve a pdf I get the following error in Chromes console:
Resource interpreted as Document but transferred with MIME type application/pdf

The pdf is downloaded and viewable as expected so nothing is actually broken. The error warning just makes me nervous.

This is the code to serve the pdf:
web_response -> sendfile(#pdf -> asbytes, ’filename.pdf’)

And application/pdf is, ASFAIK, the correct MIME type for pdfs.

This is Lasso 9.2.7 served from Centos 6 and viewed on Mavericks.

HDB
Jolle

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: What's up with Chrome and pdf downloads

Bil Corry-3
Not sure - Google has a lot of hits on the same question, but no answers.
I did find mention that it's related to Chrome prefetching the document.
You might try disabling Chrome's prefetch/prerender and see if the problem
goes away.  Regardless, I would ignore the error.


- Bil

On Sat, Nov 1, 2014 at 5:28 PM, Jolle Carlestam <[hidden email]> wrote:

> When I have Lasso produce and serve a pdf I get the following error in
> Chromes console:
> Resource interpreted as Document but transferred with MIME type
> application/pdf
>
> The pdf is downloaded and viewable as expected so nothing is actually
> broken. The error warning just makes me nervous.
>
> This is the code to serve the pdf:
> web_response -> sendfile(#pdf -> asbytes, ’filename.pdf’)
>
> And application/pdf is, ASFAIK, the correct MIME type for pdfs.
>
> This is Lasso 9.2.7 served from Centos 6 and viewed on Mavericks.
>
> HDB
> Jolle
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>   the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
>

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>