4 ms·
The quality range between 0 and 1 is because it's a percentage. Think of an image, the HTTP request being for an image. The client can say (in an Accept header
by buro9 14y ago
The quality range between 0 and 1 is because it's a percentage.
Think of an image, the HTTP request being for an image. The client can say (in an Accept header), "Give me a lossless .tiff if you have it, but if you don't then I'd like an image in .jpg format that is 80% quality. If you can't do that then I'd prefer a .gif that is equivalent to 50% quality. If you've failed on that... well, screw it, I'll take ASCII art, it's better than nothing.".
The quality represents a loss in quality of the supplied resource, and a preference list of the order of acceptable types (in the case of an Accept header) for each step down in quality.
It's a bit of an abuse to read quality as "order by" and to treat the percent quality as "range 0-1000".
I think that example is actually given in the specs, but I'm fairly sure audio was the resource type used.