DEV Community

Pacharapol Withayasakpunt
Pacharapol Withayasakpunt

Posted on

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

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?

Top comments (1)

Collapse
 
ryanfiller profile image
ryanfiller

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.

MongoDB Atlas runs apps anywhere. Try it now.

MongoDB Atlas runs apps anywhere. Try it now.

MongoDB Atlas lets you build and run modern apps anywhere—across AWS, Azure, and Google Cloud. With availability in 115+ regions, deploy near users, meet compliance, and scale confidently worldwide.

Start Free

👋 Kindness is contagious

Explore this insightful write-up embraced by the inclusive DEV Community. Tech enthusiasts of all skill levels can contribute insights and expand our shared knowledge.

Spreading a simple "thank you" uplifts creators—let them know your thoughts in the discussion below!

At DEV, collaborative learning fuels growth and forges stronger connections. If this piece resonated with you, a brief note of thanks goes a long way.

Okay