DEV Community


How complex are your URL querystrings? And how do you encode it? Also, do you validate it?

patarapolw profile image Pacharapol Withayasakpunt ・1 min read

Does it have

  • Unicode? non-ASCII characters? (e.g. CJK, cyrillic, Thai)
  • Arrays? (I know there are multiple ways, but standard or "should do" is???)
  • Integers?
  • Booleans?

What about logging on the server? Is it human-readable?

I know there is Rison, but I don't think it is popular...

Also, encodeURIComponent is neither strict, nor as lenient as possible...

This is the thought to another topic. I realized that max safe length of URL encoded GET or DELETE might be around 2000 characters. But, what is really the "SHOULD NOT exceed" length?

Discussion (1)

Editor guide
ryanfiller profile image

It’s not exactly the point of my post, but I wrote a little bit about the built-ins browsers provide for en/decoding params here.