tvler / lazy-progressive-enhancement

A lazy image loader designed to enforce progressive enhancement and valid HTML.
http://tylerdeitz.co/lazy-progressive-enhancement/
MIT License
190 stars 10 forks source link

Scroll-based load: Use a variable to store original src instead of a data attribute #5

Closed tvler closed 8 years ago

tvler commented 8 years ago

Data attributes are slower and create more markup cruft. It would be better to pass the original source string in as a parameter into the scroll logic –– it will prob make the minified file smaller too.

tvler commented 8 years ago

Fixed in https://github.com/tvler/lazy-progressive-enhancement/commit/cf18fce4f392162981ef565efba7b0d7c21e34b5

(79 characters smaller in the min!!)