-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Dev - OpenCollective Image Lag #1548
Comments
@pierreneter I'll add a note about this in #1525, but I'm really not sure what we can do to resolve this seeing as were not serving the content. Being an open source project, there's only so much we can do in terms of hosting infrastructure and in this case we aren't even serving those images ourselves (as you pointed out). Also, the page is interactive/scrollable before those images load (in my experience at least) so I'm not sure how much we gain by refactoring. For the reasons listed above, my initial inclination was to close this and mark as What do you think of this approach? We could use a placeholder image and defer loading the rest until after the initial page load. It would be nice if I am going to move this to a note in #1525, but feel free to keep discussing here and potentially open a PR. Once we've plowed through a bit more of the content-related backlog, I wouldn't be against re-opening as long as it stays active. Also note that you should have gotten/be getting invites to be a collaborator and join our slack channel. Thanks again for your work so far! |
You could make a React component that takes and image source and then when scrolled into view (or some other boolean), lazy-loads the image and fades it in. This would essentially defer the image fetch, because browsers normally identify Not loading images at all until they're needed might be a more elegant solution, but you'd need a method to help you determine if an element is in view. |
Location: Vietnam,
My speed:
Most of the time it takes to load the home page from the avatars of the backer.
Avatars are provided from
opencollective
and we can not manage the cache settings on the header.Of course, these avatars will also be able to change frequently, so we should not cache it.
I think browser cache management is just a temporary solution.
For the first time, when the cache is not saved it still takes a lot of time to load the page.
So, skip the cache control problem.
We really need to solve this problem in a different way.
So...
What is the best way for this?
The text was updated successfully, but these errors were encountered: