tachyon
tachyon copied to clipboard
Accept standard argument formats for "false" attributes passed through query args
(Leaving this issue here just so I don't forget about it over the weekend.)
While troubleshooting an issue trying to bypass the automatic webp formatting with @smccafferty, we noted that none of the expected formats (?webp=false
, ?webp=0
, ?webp=no
) for setting the webp
query argument to false worked as we'd expected. I guess this makes sense, because URL query parameters are interpreted as strings both by the URLSearchParameters()
js API and by AWS Lambda's queryStringParams
. But it was surprising that 'false', '0', and 'no' all evaluated as true.
Sean was able to work out that setting the attribute to an empty string, like ?webp=
, works for disabling webp. But I'd like to see a more intuitive interface.