I am after a pre-loader (a spinning loader, to demonstrate that image is being loaded in the background).
I have a global pre-loader for the SPA itself, so the user sees a loader while the SPA is being downloaded in the background.
However, when the user navigates to a different page with images, those new images have to be downloaded by the user's browser and the global pre-loader is not being triggered.
One thing to add, images are mostly used as background images.
What can I do to show existing loader until all images were downloaded or is there an alternative solution?
With jQuery a solution would have been to use $(document).ready, to remove loaded once the document is ready. However, I am struggling to find a solution for it with VueJS.
Currently the solution that I see for is to use something similar to this: https://vuejsexamples.com/a-vue-component-for-showing-loader-during-image-loading/, but still, this wouldn't handle css background images.
from A loader for when images are being downloaded
No comments:
Post a Comment