Re:Show HN: Create Chart Images from a URL
by joering2 on Wednesday March 06, 2019 @01:08PM
(#19321069)
Great stuff and free :) question - you don't need to urlencode the paramteres in the URL? how so? Further - isnt that limited to 1024 chars per URI specs ?
[ Parent
| on HN ]
Re:Show HN: Create Chart Images from a URL
by typpo on Wednesday March 06, 2019 @01:41PM
(#19321376)
You probably should urlencode the parameters for longer URLs and chart definitions containing special characters. For simpler examples we can get away without URL encoding.
The server is configured to accept up to ~64kb URLs. Some browsers have built-in limitations that range from 5120 characters (IE 11) to 64k [1]. Of course, a URL that large becomes very unwieldy. Maybe I should add a way to save charts to a short url.
[1] https://stackoverflow.com/questions/417142/what-is-the-maxim...
Re:Show HN: Create Chart Images from a URL
by koolba on Wednesday March 06, 2019 @02:15PM
(#19321700)
Could also add gzip/deflate/base64 of the query parameter. For many JSON payloads the compression ratio can be 10:1. If it’s all happening client side then the processing cost is pushed to the browser so an added decompress wouldn’t change much.
Re:Show HN: Create Chart Images from a URL
by aeorgnoieang on Wednesday March 06, 2019 @01:45PM
(#19321416)
It seems like you would need to encode the parameter value; and in the same way as anything else.
There isn't a limit of URI length per the relevant 'specs'. There are generally limits imposed by _browsers_, and probably web servers too tho.