Live data from Hacker News

I’ve banned query strings

chrismorgan.info

291–300 of 317 posts

Re: I’ve banned query strings

#291

Earlier quoted context omitted.

I understand being for privacy, but on the flip side, information about you can result in a better experience. E.g. in the case of tracking where a person comes from, that can help those two websites improve by coordinating with each other in some way. Or your ads might actually show you something you didn't know you existed that you end up buying. That's probably better than seeing ads you likely have zero interest…

I started writing a follow-up half an hour before you posted, since the parent comment has been unusually highly voted. I dropped it again, but now you’ve given me something to respond to. I say I’m broadly anti-tracking. I think it’s clear by this point to anyone with a skerrick of wisdom that the logical extreme of tracking is bad. But for a long way it seems innocuous. So how far do you go before declaring it unac…

> C’est la vie. I’ll survive.

Will you? You made a widget and you're trying to sell it. You've taken out a second mortgage on your house, and used up all your savings. You're down to your last $10,000. If you don't start making sales soon, you're sunk. Where do you spend that $10,000? Facebook? Instagram? Google? TikTok? If you don't know where your leads are coming from, how do you know where to spend your marketing budget?

Re: I’ve banned query strings

#292

Earlier quoted context omitted.

Oh, I have a couple - the users did not agree on being tracked (these query params are tracking information), and the site administrator does not want incoming traffic to be tracked. I know the latter can be hard to understand, but I for example sure as hell do not want to have any info in my logs that can be used to harm my users. On a more personal note, I hate it when I go to copy a link to send via a message, and…

>(these query params are tracking information) Query strings are useful for way more than just tracking. Saving and servicing search queries is a way more common use case. So assuming it's only useful for tracking is very misleading. Query strings are probably the least invasive tracking. They are transparent, obvious, and anonymous. Users are free to strip out and edit query strings if they don't want them. More to…

> Query strings are probably the least invasive tracking. They are transparent, obvious, and anonymous.

They're not necessarily anonymous. utm=Google.com is, but s=abcdefg, where abcdefg is a hash of the specific user that generated that link, identifies to the site the specific user the link was shared from.

Re: I’ve banned query strings

#293
post #120

Earlier quoted context omitted.

Is it not a random walk? Might sound pedantic but if there is graph structure I am interested.

I'll start with the clarification that the moderators have changed the URL of the original post from https://susam.net/no-query-strings.html > to https://chrismorgan.info/no-query-strings >. Hopefully, this will prevent any confusion about why we are discussing random walks in a post about query strings. Now let me answer your question. > Is it not a random walk? Might sound pedantic but if there is graph structure I…

Oh cool, I love this approach. Randomized graph traversal but ever visited node is a fast travel station. Great way to avoid running into dead ends.

Re: I’ve banned query strings

#294

Earlier quoted context omitted.

I understand being for privacy, but on the flip side, information about you can result in a better experience. E.g. in the case of tracking where a person comes from, that can help those two websites improve by coordinating with each other in some way. Or your ads might actually show you something you didn't know you existed that you end up buying. That's probably better than seeing ads you likely have zero interest…

Textbook marketing speak: “Don't you want more relevant ads?”. It assumes that “ads” = useful information, but that's rare at best. Most ads focus on stealing your attention and creating a fear of missing out. NordVPN isn't educating you. They just manufacture a need and then hope that you won't invest time in researching a better option. Why would I give them more leverage to do that?

I genuinely would rather see ads for products I might like yet do not know exist instead of purely random ads. I don't understand why a person wouldn't.

Re: I’ve banned query strings

#295
I noticed that ChatGPT started to add the utm_source parameters for all links it recommends. For example, for GitHub links. Not sure if this critical or not but it could affect users for sure if URLs with any query parameters are blocked.

Re: I’ve banned query strings

#296

Earlier quoted context omitted.

Back in the day it was reasonably common for CMSs and forums to only have an index.php, and routing entirely by query string (in form-urlencoded form, people were not savages). So you would have index.php?p=home and index.php?p=shop. Or index.php?action=showthread&forum=42&thread=17976. It should be immediately obvious that in that scheme 404 is indeed the correct answer to unknown query parameters In fact lots of si…

At the risk of naming an Eldritch horror, IIRC it was Cold Fusion that first adopted something like an MVC-in-querystring routing system in the late 90s or early 00s, and that eventually spread when FCGI caught on and users of other languages got used to long-running middleware processes. It seemed hella elegant at the time.

Tangent: Much like PHP, "modern" CF isn't actually that bad to work with these days. In particular the superset-of-html syntax has been superseded for pure logic by "CFScript" which is just an ECMAScript dialect.

There's even a package manager, test harness, etc. And of course it's JVM hosted so it's fairly easy to use Java stuff (stdlib of otherwise) if what you need doesn't exist in CF.

Re: I’ve banned query strings

#298

Earlier quoted context omitted.

My next website is going to have the path portion of the URL be a base64 encoded ASN.1 blob.

Make sure you use URL-safe base64 or the portions that looks like a path can get mangled MII//epi Is converted to MII/epi

That would be broken software.

https://en.wikipedia.org/wiki///

Re: I’ve banned query strings

#299
post #90

Earlier quoted context omitted.

Just straight "400" ("Bad Request") or "403" ("Forbidden") would also probably be defensible. Odd that there aren't any error response codes specific to URI parameters. Several options which seem like they might be appropriate aren't on close examination: - "406" ("Not Acceptable") which is based on content-negotiation headers. - "409" ("Conflict") which is largely for WebDAV requests. - Others such as 411, 422, and…

I think either 400 or 404 would be fine. 400 because the request isn't in the expected format, 404 because a resource with that query string doesn't exist.

I shy from 404 because the resource itself may be valid, it's the query parameters which aren't acceptable. Returning 404 could result in some remote processes, particularly Web crawlers, incorrectly marking the base resource as unavailable, which may not be desirable.
Post reply on HN