Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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 ?


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...


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.


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.


... and proxies




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: