Age-old dilemma: I hate long URLs, but I also don't want to get fancy with using Javascript to create custom query encodings.

E.g. A list of column names would encode in a query string as 'c=column_a&c=column_b' etc. But more efficient would be: "c=ab" (one character per selected column) or even "c=3" (yay for bit flags).

Real example of a URL I just created:

/u2/ulist?c=added&c=finished&c=modified&c=rating&c=rel&c=started&c=vote&c=voted&l=-1&l=1&l=11&l=12&l=2&l=3&l=4&l=5&l=6&l=7&o=d&p=2&s=label

That could be *much* shorter! :blobcatnotlikethis:

I'm just complaining about it because I don't feel like working on the CSS mess that needs my attention right now. :blobblush:

@ayo Hmmm, I wonder if there's any tools I could help someone build that'd help you tidy up that mess...

@ayo What does that have to do with JS? Granted, client-side routing never made much sense to me, I don't see anything preventing it to be done server-side.

@wasamasa The naive and long query parameters can be generated through <form method="get">. That'll not work with custom encodings.

@wasamasa For a real (and not very extreme) example, check out vndb.org/hist

That filter selection section is just a plain CSS'd HTML form with checkboxes and radio buttons.

@ayo Thank you, that makes more sense. I can imagine some workarounds, but nothing less icky. Somehow I suspect the web doesn't exactly lend itself to complex user interfaces...

@ayo
Send it via POST so that people don't see this mess :P

Sign in to participate in the conversation
niu.moe

Welcome to your niu world ! We are a cute and loving international community O(≧▽≦)O !