Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images do not load under Chrome when internet is slow #215

Closed
optimal-IT opened this issue Nov 16, 2020 · 5 comments
Closed

Images do not load under Chrome when internet is slow #215

optimal-IT opened this issue Nov 16, 2020 · 5 comments

Comments

@optimal-IT
Copy link

While the pictures are visible in the website, the print preview leaves them out when the network connection is slow.
This happens only under Chromium-based browsers (no issue with Firefox and IE)

If you go to the demo website: https://jasonday.github.io/printThis/#demos
Change browser settings in DevTools > Network > set speed from Online to Slow 3G
Press 'PRINT CONTAINER' or 'PRINT KITTENS' buttons
The images have disappeared from the preview.

In the DevTools network tab when recording network log, it is also visible that the pictures are not fully loaded.

@tanvir-kx
Copy link

Having the same issue. Is there any update regarding this?

@jasonday
Copy link
Owner

jasonday commented Apr 7, 2021

The issue is related to timing. You can increase the printDelay if you're printing with a lot of images, long form content, etc. to counteract. I'm working on a version where timing won't be an issue, but I don't have an ETA.

@patrickhrastnik
Copy link

Just a guess, would it be possible to print the images without reloading them?
I don't have a detailed insight to jquery, but I wonder why the images need to be reloaded even though they are already visible in the page onbefore.

@jasonday
Copy link
Owner

@patrickhrastnik - it's because of how printThis works. It creates an iframe, writes content to that iframe, and then prints the iframe. Those images have to load when being written to the new iframe.

@zulfirman
Copy link

for now I use printDelay, I count the number of images that are showing then multiply it.

printDelay: totalImages*500,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants