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

Preload images #4

Open
2 tasks
pichfl opened this issue Oct 29, 2020 · 3 comments
Open
2 tasks

Preload images #4

pichfl opened this issue Oct 29, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@pichfl
Copy link
Collaborator

pichfl commented Oct 29, 2020

  • Build a JavaScript preloader which postpones the application load until all images are ready.
  • Show and style a progress display for the preloader
@pichfl pichfl added the enhancement New feature or request label Oct 29, 2020
@marcoow
Copy link
Member

marcoow commented Nov 26, 2020

I'd strongly recommend adding ember-cli-workbox as a dependency here and preloading the images with that. The current implementation with the <link rel="preload"> tags has significant performance implications and I'd say service workers are kind of the standard solution for preloading anything now.

@pichfl
Copy link
Collaborator Author

pichfl commented Nov 26, 2020

I was hoping to keep this addon as light and free of dependencies as possible, but I think you're also right.

This issue however is not about prefetching in the background, but actually blocking application init until all assets are loaded. While this is not good behavior for an existing ember app, it is sensible to do in a blank project that exists just as a prototype.

@marcoow
Copy link
Member

marcoow commented Nov 26, 2020

So the service worker will preload once the application has started but you can of course call the service's load in the application route's model to make sure all images are in fact loaded before the app starts up.

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

No branches or pull requests

2 participants