Open weihao opened 2 years ago
current:
https://example/#player:c73cc074-d167-3117-8758
wanted:https://example/players/notch
There are really three issues here, we might consider wanting to split them up. But for now some points could be discussed here.
Never thought about anybody care for this as it's not meant as a front page at all, but sure, this could easily be generated.
I agree that it's more straightforward to use names. There are a few points why I (still) use UUIDs.
Passing a mapping to clients may be much easier and I should stop worrying about the kilobytes, especially due to browser caching. This would make several other things much simpler again at the mere cost of a slight traffic peak when loading the page for the first time, so count me in.
The reason I'm using the anchor-style URLs (#
) is because they can be evaluated in onhashchange
and (only) the necessary content needs to be swapped with no page reload (and script re-initialization) necessary. Also, the site works without having to configure anything in the webserver.
I'm honestly not sure if or how directory-style URLs can be achieved without any webserver setup? Surely without any special setup, when requesting https://example/players/notch
, the webserver will attempt to access an index file in the players/notch
directory – but it may be that I'm simply not aware of solutions here.
After all, it'd be nice to have this, but the setup must remain as simple as possible.
current:
https://example/#player:c73cc074-d167-3117-8758
wanted:
https://example/players/notch
We should consider using the display name of a player for better SEO. We should also include a sitemap and better metadata.