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

TODO: full browser support #48

Open
ihadeed opened this issue May 5, 2017 · 3 comments
Open

TODO: full browser support #48

ihadeed opened this issue May 5, 2017 · 3 comments

Comments

@ihadeed
Copy link
Member

ihadeed commented May 5, 2017

This PR was a good start to add some browser functionality. Running an app in browser (PWA, ionic serve ... etc) should do the following

  • load images before setting background CSS property or src attribute (via XHR)
  • use fallback image if loading failed
@marcosmfjunior
Copy link

hi, can u explain better how to do 1st step?

load images before setting background CSS property or src attribute (via XHR)

@ihadeed
Copy link
Member Author

ihadeed commented Sep 17, 2018

@marcosmfjunior
If the image host server sends browser-caching headers, then doing an XHR request (using Angular HTTP) will preload the image.

If we don't have cache headers, we need to create Image element and set it's src to that URL. The element doesn't have to be rendered in the DOM, just needs to exist in the memory.

@erperejildo
Copy link

I thought this was also working on browser. Makes sense now.
Anyway, I'll subscript for further info

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

3 participants