this post was submitted on 02 Feb 2024
366 points (99.5% liked)

Firefox

17890 readers
7 users here now

A place to discuss the news and latest developments on the open-source browser Firefox

founded 4 years ago
MODERATORS
 

"Copy Link Without Site Tracking" now on @firefox ! 🙌

you are viewing a single comment's thread
view the rest of the comments
[–] pixelmeow@lemmy.world 3 points 9 months ago (1 children)

Everything after the final slash is data. This data is stored in key/value pairs, where the key is a variable name that is expected in the server’s code and the characters following the “=“ is the encrypted value. Each pair is separated by an encrypted “&”, or “&”. Many times this string of values begins with a “?”.

https://example.com/path/to/item/?id=568953&name=shjbxsdhjhcdf&xyz=djkkgcdtjn

So we can maybe guess what the values might be but only if we know what the keys mean, and then we’d have to give exactly the right data for each key (id, name, xyz). For all we know the most important piece of data in that string is xyz and it may be required, but we don’t know that so we strip the whole query string off and now have a useless URL.

Mostly, stripping off the query string should be fine if the path to the item you’re looking for is enough. Like the amazon example in the other comment. Other times, not so much.

Sorry for the novel, I can explain more if you’d like.

[–] Neato@ttrpg.network 2 points 9 months ago (2 children)

Yeah that's what I was thinking as well. Amazon and YouTube are the only two I know of that use those strings for specific pages or content.

[–] Ephera@lemmy.ml 2 points 9 months ago

In general, you see it more often for older websites or older server software, because we only really worked out around the year 2010 or so, that essential information for identifying a resource should be placed in the path.

Beforehand, it was largely something that webpage authors decided based on gut feeling...

[–] pixelmeow@lemmy.world 2 points 9 months ago

Yup. I’m copying some Audible links now and the ampersand isn’t encrypted and the query string starts after the ? instead of the last slash, so there are different ways of doing it. We couldn’t guess at that, though! :)