-
Notifications
You must be signed in to change notification settings - Fork 504
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
Fallback without Javascript #2
Comments
The image will download anyway. If you want fallbacks use a |
Hum, I don't believe this is true, at least in my test, using Firefox and disabling javascript on this page: http://toddmotto.com/labs/echo/ I do not see the photos but only the rotating loader... |
My reply was to your |
Ho, I see, thanks for the reply. But wouldn't it be better to leave the HTML untouched, then using JS replace the src tag for all images to the "turning loader", and load the photos as you scroll down? This way the HTML doesn't need to be modified, plus the photos will still appear if the javascript doesn't load or is disabled... |
If you leave the HTML untouched, that defeats the whole concept/benefit of lazy-loading? :) If I load the page as:
...then change all images to:
All images previously specified will download, and there is really no point in any further manipulation. Changing them back to the original If you're worried about JS, then don't use lazy-loading or provide |
Ho I see, sorry! I assumed it would be possible to replace the original src tag before the browser would load all the images. |
You can only replace the HTML: CSS
That way any placeholder images will be completely hidden and |
Thanks a lot for this, I really appreciate your time and input on this, and thanks for bearing with me! |
You're welcome. Feel free to tweet for anything in future. |
The big problem with this is that the images won't show if there is no javascript. It would be better to leave the original img src and change it with javascript to the loading image...
The text was updated successfully, but these errors were encountered: