6 ms·
That is effectively the same (but not quite as nice) as the solution I linked to. The problem is that I can't ask Joe Client to create placeholder divs. I wan
by JoelSutherland 16y ago
That is effectively the same (but not quite as nice) as the solution I linked to.
The problem is that I can't ask Joe Client to create placeholder divs. I want to handle it magically for him.
- Groxx 16y agoBut you can ask Joe Client to make everything as they like, and then post-process it when it's saved, shrinking images and replacing them with placeholders automatically. edit: looked at page code. Isn't that nearly the same as placeholders though? You're asking them to suffix their images, and add a non-standard attribute to every one they want to load dynamically. That burden, and the image resizing, is all done by Joe Client via that framework, under identical assumptions. That's not magical, and it's functionally identical to what I proposed, but it causes extra requests.
- JoelSutherland 16y agoIt is nearly the same as a placeholder. The advantage is that even without JS, it still functions and has meaning. This is a big advantage. Just as your placeholder could happen in post processing, so could the suffix and attribute be added. Having looked into this more there seem to be only three decent approaches. 1) Send the small image first potentially causing extra HTTP requests. 2) Require JS to make a placeholder swap. 3) Cap the image dimensions server side based on a User Agent/Resolution table. Option 3 is terrible to implement but avoids the downsides the others have.