2 ms·
You could avoid that with a simple optimization where the page could indicate the byte ranges for a tile level. Suppose something like this worked: <pictur
by acdha 13y ago
You could avoid that with a simple optimization where the page could indicate the byte ranges for a tile level. Suppose something like this worked:
<picture>
<source srcset="foo.jp2 100w 100h range=1-<first layer>">
<source srcset="foo.jp2 500w 500h range=1-<middle>">
<source srcset="foo.jp2 1000w 1000h">
</picture>
That'd avoid the need to a round trip at all and it'd also be a huge improvement for caches which support HTTP range correctly since it'd be a single resource rather than multiple different URLs. It'd also allow browsers to start making decisions like selectively preloading more of an image which the user is likely to zoom, etc. although some of that would come simply from a good progressive JP2 implementation.
- othermaciej 13y agoManually specifying different HTTP ranges of the same resource is more verbose, more error-prone and more confusing than just specifying different resources. Other than that, I guess it would work.
- acdha 13y ago> more verbose, more error-prone and more confusing than just specifying different resources That's largely opinion: are byte ranges really better than having to maintain clusters of related images? Any serious site already has to deal with things like cache invalidation when a source file changes and by the scale of things which sites do for performance this is certainly no worse than, say, JavaScript/CSS minification or UA sniffing.