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

Flag to enable image caching #9

Closed
Pezmc opened this issue Feb 9, 2014 · 1 comment
Closed

Flag to enable image caching #9

Pezmc opened this issue Feb 9, 2014 · 1 comment

Comments

@Pezmc
Copy link

Pezmc commented Feb 9, 2014

It would be great if instantclick could also start caching the images found in the body of the new document during the preload phase.

It could go through the new body find any img's, extract their src and load them hidden into the current dom.

I'm unsure if you could then rely on the browser cache when swapping the bodies, or whether you'd have to swap the img's in the new body with your caching images.

This should be a toggleable option to avoid using a large amount of bandwidth on image heavy pages (perhaps you whitelist the images?)

@dieulot
Copy link
Owner

dieulot commented Feb 9, 2014

Nah, this would be a bit too crazy! Sorry.

Even as an option I’m opposed against it because it would add code complexity and size for something that isn’t desirable for a many websites.

For fast images displays, if you’re not doing it already I recommend setting width and height in the markup (or CSS) and using progressive JPEGs.

@dieulot dieulot closed this as completed Feb 9, 2014
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

2 participants