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

option to immediately load images if no Intersection Observer detected? #51

Closed
leeoniya opened this issue Apr 3, 2019 · 5 comments · Fixed by #73
Closed

option to immediately load images if no Intersection Observer detected? #51

leeoniya opened this issue Apr 3, 2019 · 5 comments · Fixed by #73

Comments

@leeoniya
Copy link
Collaborator

leeoniya commented Apr 3, 2019

hey @malchata ,

i don't really feel like polyfilling Intersection Observer and would prefer to just immediately load everything. is this something you could add?

thanks!

@leeoniya
Copy link
Collaborator Author

leeoniya commented Apr 3, 2019

eh, it's not just IE11. i forgot iOS Safari doesn't have it :(

oh well, might be a good option either way.

@malchata
Copy link
Owner

malchata commented Apr 3, 2019

Seems reasonable to me. I can take a stab at it when I get a sec.

@hmphu
Copy link

hmphu commented Apr 9, 2019

+1 for this. Safari on IOS doesn't have it

@hmphu
Copy link

hmphu commented May 8, 2019

@malchata have you had a look to this case. We're really love to have it

@leeoniya
Copy link
Collaborator Author

leeoniya commented May 8, 2019

Safari 12.1 finally has Intersection Observer API [1].

Thankfully, Apple is pretty aggressive at nagging/upgrading their users. Here are our metrics for Safari 12.1 adoption over the past 2 months (usa, e-commerce, home remodeling):

Safari 12.1:

safari-12 1

Safari < 12.1:

safari-not-12 1

certainly there will always be a long tail, but at least it will be minority rather than a majority.

[1] https://developer.apple.com/documentation/safari_release_notes/safari_12_1_release_notes

radfahrer added a commit to radfahrer/yall.js that referenced this issue Nov 22, 2019
Now that most browsers support intersectionObserver, its much more 
tempting to leave the polyfill out to avoid punishing users of supported 
browsers with the download size of the polyfill.
radfahrer added a commit to radfahrer/yall.js that referenced this issue Nov 22, 2019
Now that most browsers support intersectionObserver, its much more
tempting to leave the polyfill out to avoid punishing users of supported
browsers with the download size of the polyfill.
malchata added a commit that referenced this issue Apr 3, 2020
Adds noPolyfill option to immediately load all lazy images in unsupported browsers (resolves #51)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants