Re: [svgwg] A separate MIME type for svgz files is needed (#701)

So ... we're just gonna ignore that data URIs work for every widely used file format except svgz?
Shouldn't W3C/IETF come up with a way to solve that? Even if it means updating data URI spec?
Doing a quick search, apparently it was expected/verified to work before (unless I understood it wrong?) in 2010 (in fact, without any changes, just by auto-detecting it):
https://mailarchive.ietf.org/arch/msg/pkix/7XbZ6Ylg8-n-ACnu7TPz3PPFss0/

I don't know about current Opera, but there's no way to make it work, at least in Firefox. Unless HTML `<img>` has some attribute I'm unaware of that would simulate a `Content-Encoding: gzip` for data URIs, or something like that (though it still wouldn't work when opening the data URL in a new tab). I don't think it has.

Btw, I'm not advocating for any specific solution or spec change necessarily, it's just so awkward that something that should work for every file type with a MIME doesn't work in this case because of some technicality-deadlock-thing.
> if browsers were required to detect the gzip magic number 0x1F8B

Perhaps the word "require" is too strong here, but what about "recommend"? Something along the lines of:
> It's recommended that user agents interpret data URIs of the form `data:image/svg+xml;base64,` where the binary data starts with the gzip magic number `0x1F8B` as an SVGZ file, as if it had been served with the `Content-Encoding: gzip` HTTP header.

Or maybe even "allowed":
> User agents are allowed to interpret [...] as SVGZ [...]

IMO it would be the best compromise so that we could at least get this to eventually work in *some* way. What would be the impediment or downsides? Or maybe there's some other better way to do it?

-- 
GitHub Notification of comment by geekley
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/701#issuecomment-1513867211 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 18 April 2023 22:30:27 UTC