Обсуждение: Excessive # usage in URLs
Robert, * Robert Haas (robertmhaas@gmail.com) wrote: > (And let me say parenthetically that the web site's insistence on > adding #THE-SAME-MESSAGE-ID-THAT-IS-ALREADY-IN-THE-URL to everything > is pretty annoying ... it makes the links really long for no good > reason.) Totally agreed, this has annoyed me a number of times also. Magnus, others on www, anything we can do about that..? Thanks! Stephen
On Fri, Oct 23, 2015 at 2:52 PM, Stephen Frost <sfrost@snowman.net> wrote:
Robert,
* Robert Haas (robertmhaas@gmail.com) wrote:
> (And let me say parenthetically that the web site's insistence on
> adding #THE-SAME-MESSAGE-ID-THAT-IS-ALREADY-IN-THE-URL to everything
> is pretty annoying ... it makes the links really long for no good
> reason.)
Totally agreed, this has annoyed me a number of times also.
Magnus, others on www, anything we can do about that..?
Certainly sounds like something that's fixable. But where? I just clicked around a bit and I don't see it...
* Magnus Hagander (magnus@hagander.net) wrote: > On Fri, Oct 23, 2015 at 2:52 PM, Stephen Frost <sfrost@snowman.net> wrote: > > * Robert Haas (robertmhaas@gmail.com) wrote: > > > (And let me say parenthetically that the web site's insistence on > > > adding #THE-SAME-MESSAGE-ID-THAT-IS-ALREADY-IN-THE-URL to everything > > > is pretty annoying ... it makes the links really long for no good > > > reason.) > > > > Totally agreed, this has annoyed me a number of times also. > > > > Magnus, others on www, anything we can do about that..? > > > > Certainly sounds like something that's fixable. But where? I just clicked > around a bit and I don't see it... Flat view. This: http://www.postgresql.org/message-id/flat/CABUevEw_kEPdKFqAgFJDtwxjbbNq+bcpWrTV0ekF9ei8SdcEGg@mail.gmail.com auto-redirects to: http://www.postgresql.org/message-id/flat/CABUevEw_kEPdKFqAgFJDtwxjbbNq+bcpWrTV0ekF9ei8SdcEGg@mail.gmail.com#CABUevEw_kEPdKFqAgFJDtwxjbbNq+bcpWrTV0ekF9ei8SdcEGg@mail.gmail.com What I'd like (and Robert, iiuc) is for the link to the first message in the flat view not to have the # and to not redirect to the one with the # when it's not there. Make sense? Thanks! Stephen
On Fri, Oct 23, 2015 at 4:57 PM, Stephen Frost <sfrost@snowman.net> wrote:
* Magnus Hagander (magnus@hagander.net) wrote:
> On Fri, Oct 23, 2015 at 2:52 PM, Stephen Frost <sfrost@snowman.net> wrote:
> > * Robert Haas (robertmhaas@gmail.com) wrote:
> > > (And let me say parenthetically that the web site's insistence on
> > > adding #THE-SAME-MESSAGE-ID-THAT-IS-ALREADY-IN-THE-URL to everything
> > > is pretty annoying ... it makes the links really long for no good
> > > reason.)
> >
> > Totally agreed, this has annoyed me a number of times also.
> >
> > Magnus, others on www, anything we can do about that..?
> >
>
> Certainly sounds like something that's fixable. But where? I just clicked
> around a bit and I don't see it...
Flat view.
This:
http://www.postgresql.org/message-id/flat/CABUevEw_kEPdKFqAgFJDtwxjbbNq+bcpWrTV0ekF9ei8SdcEGg@mail.gmail.com
auto-redirects to:
http://www.postgresql.org/message-id/flat/CABUevEw_kEPdKFqAgFJDtwxjbbNq+bcpWrTV0ekF9ei8SdcEGg@mail.gmail.com#CABUevEw_kEPdKFqAgFJDtwxjbbNq+bcpWrTV0ekF9ei8SdcEGg@mail.gmail.com
What I'd like (and Robert, iiuc) is for the link to the first message in
the flat view not to have the # and to not redirect to the one with the
# when it's not there.
Make sense?
Oh, gotcha - I was missing the "/flat/" part which is what triggers it.
The point of the # is that you actually want to point to that specific message in the thread. If you just pick the first message in the thread we could exclude it, but how else would you link to a specific message?
* Magnus Hagander (magnus@hagander.net) wrote: > The point of the # is that you actually want to point to that specific > message in the thread. If you just pick the first message in the thread we > could exclude it, but how else would you link to a specific message? The request isn't to remove the "#" ability for the flat view entirely, it'd just be nice if the site didn't redirect to having the "#" when the message-id after the "#" is the same as the one before the "#" (iow, it's the first message). Eg: you go here: http://www.postgresql.org/message-id/20151023125233.GQ3685@tamriel.snowman.net The link to "whole thread" is: http://www.postgresql.org/message-id/flat/20151023125233.GQ3685@tamriel.snowman.net But you go there and it immediately redirects to: http://www.postgresql.org/message-id/flat/20151023125233.GQ3685@tamriel.snowman.net#20151023125233.GQ3685@tamriel.snowman.net Which is just, well, redundant, and makes the URL longer than it needs to be. Thanks! Stephen
On Fri, Oct 23, 2015 at 5:10 PM, Stephen Frost <sfrost@snowman.net> wrote:
* Magnus Hagander (magnus@hagander.net) wrote:
> The point of the # is that you actually want to point to that specific
> message in the thread. If you just pick the first message in the thread we
> could exclude it, but how else would you link to a specific message?
The request isn't to remove the "#" ability for the flat view entirely,
it'd just be nice if the site didn't redirect to having the "#" when the
message-id after the "#" is the same as the one before the "#" (iow,
it's the first message).
Eg: you go here:
http://www.postgresql.org/message-id/20151023125233.GQ3685@tamriel.snowman.net
The link to "whole thread" is:
http://www.postgresql.org/message-id/flat/20151023125233.GQ3685@tamriel.snowman.net
But you go there and it immediately redirects to:
http://www.postgresql.org/message-id/flat/20151023125233.GQ3685@tamriel.snowman.net#20151023125233.GQ3685@tamriel.snowman.net
Which is just, well, redundant, and makes the URL longer than it needs
to be.
Ok, there I agree it makes more sense. But the previous example wasn't one of those :)
Anyway, yes, should definitely be doable. I'll stick it on my TODO list, but I'm swamped with pgconfeu things right now so it won't be until after that.
* Magnus Hagander (magnus@hagander.net) wrote: > Ok, there I agree it makes more sense. But the previous example wasn't one > of those :) Yeah, I blame the stupidly long gmail message-ids for making me not realize that. :) > Anyway, yes, should definitely be doable. I'll stick it on my TODO list, > but I'm swamped with pgconfeu things right now so it won't be until after > that. That sounds perfect, no urgency on it. Thanks! Stephen
Stephen Frost wrote: > * Magnus Hagander (magnus@hagander.net) wrote: > > The point of the # is that you actually want to point to that specific > > message in the thread. If you just pick the first message in the thread we > > could exclude it, but how else would you link to a specific message? > > The request isn't to remove the "#" ability for the flat view entirely, > it'd just be nice if the site didn't redirect to having the "#" when the > message-id after the "#" is the same as the one before the "#" (iow, > it's the first message). Here's another idea. Right now the <A NAME="tag"> tag is the message-id, but since messages are added consecutively to a thread, we could just assign each of them a number, so that to link the second message in a thread we could do this http://www.postgresql.org/message-id/flat/20151023125233.GQ3685@tamriel.snowman.net#2 We could do this in addition to the message-id-based NAME tag. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
On Fri, Oct 23, 2015 at 5:26 PM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
Stephen Frost wrote:
> * Magnus Hagander (magnus@hagander.net) wrote:
> > The point of the # is that you actually want to point to that specific
> > message in the thread. If you just pick the first message in the thread we
> > could exclude it, but how else would you link to a specific message?
>
> The request isn't to remove the "#" ability for the flat view entirely,
> it'd just be nice if the site didn't redirect to having the "#" when the
> message-id after the "#" is the same as the one before the "#" (iow,
> it's the first message).
Here's another idea. Right now the <A NAME="tag"> tag is the
message-id, but since messages are added consecutively to a thread, we
could just assign each of them a number, so that to link the second
message in a thread we could do this
http://www.postgresql.org/message-id/flat/20151023125233.GQ3685@tamriel.snowman.net#2
We could do this in addition to the message-id-based NAME tag.
True. We could also use the surrogate key we have in the db.
In fact, we could have a <a name> for each of those two, so that one could still use the other one if building URLs elsewhere, but the ones generated in the archives could use the shorter id. That's a number that goes up to max 6 digits at this point (and that would actually be guaranteed to be stable in the future, unlike just using the sequential)
On 10/23/2015 08:28 AM, Magnus Hagander wrote: > http://www.postgresql.org/message-id/flat/20151023125233.GQ3685@tamriel.snowman.net#2 > We could do this in addition to the message-id-based NAME tag. > > > True. We could also use the surrogate key we have in the db. > > In fact, we could have a <a name> for each of those two, so that one > could still use the other one if building URLs elsewhere, but the ones > generated in the archives could use the shorter id. That's a number that > goes up to max 6 digits at this point (and that would actually be > guaranteed to be stable in the future, unlike just using the sequential) > Not sure if this is useful but it seems a simple solution (without breaking existing links would be) would be to use a has of some sort: http://www.postgresql.org/archive/0q97346lkjfgapo23qk Which of course would link to either a message_id or id in the db. Of course all old links would continue to work but the default display would be the hash. Alternatively: http://www.postgresql.org/archive/0q97346lkjfgapo23qk/2 Where the hash is the thread and the #2 is the reply? JD -- Command Prompt, Inc. - http://www.commandprompt.com/ 503-667-4564 PostgreSQL Centered full stack support, consulting and development. New rule for social situations: "If you think to yourself not even JD would say this..." Stop and shut your mouth. It's going to be bad.
On Fri, Oct 23, 2015 at 5:28 PM, Magnus Hagander <magnus@hagander.net> wrote:
On Fri, Oct 23, 2015 at 5:26 PM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:Stephen Frost wrote:
> * Magnus Hagander (magnus@hagander.net) wrote:
> > The point of the # is that you actually want to point to that specific
> > message in the thread. If you just pick the first message in the thread we
> > could exclude it, but how else would you link to a specific message?
>
> The request isn't to remove the "#" ability for the flat view entirely,
> it'd just be nice if the site didn't redirect to having the "#" when the
> message-id after the "#" is the same as the one before the "#" (iow,
> it's the first message).
Here's another idea. Right now the <A NAME="tag"> tag is the
message-id, but since messages are added consecutively to a thread, we
could just assign each of them a number, so that to link the second
message in a thread we could do this
http://www.postgresql.org/message-id/flat/ 20151023125233.GQ3685@tamriel. snowman.net#2
We could do this in addition to the message-id-based NAME tag.True. We could also use the surrogate key we have in the db.In fact, we could have a <a name> for each of those two, so that one could still use the other one if building URLs elsewhere, but the ones generated in the archives could use the shorter id. That's a number that goes up to max 6 digits at this point (and that would actually be guaranteed to be stable in the future, unlike just using the sequential)
It's only been a few years, so I've now actually done this in the shape of two tiny commits and I think totaling 11 lines :)
Basically, now:
* If you navigate to the first message in a thread, no redirect at all is done
* If you navigate to the first message in a thread, no redirect at all is done
* If you navigate to another message, there is a redirect to the # url but using the md5 of the messageid keeping a lot shorter than your average gmail messageid
Well, that's actually more than 4 lines of code per year, you can't expect coding much faster than that!
FWIW, I haven't purged caches so it will gradually start showing up on threads in the archives as time go by.
Greetings, * Magnus Hagander (magnus@hagander.net) wrote: > On Fri, Oct 23, 2015 at 5:28 PM, Magnus Hagander <magnus@hagander.net> > wrote: > > In fact, we could have a <a name> for each of those two, so that one could > > still use the other one if building URLs elsewhere, but the ones generated > > in the archives could use the shorter id. That's a number that goes up to > > max 6 digits at this point (and that would actually be guaranteed to be > > stable in the future, unlike just using the sequential) > > So, do I win anything for best zombie thread back from the dead today? I think you do. > It's only been a few years, so I've now actually done this in the shape of > two tiny commits and I think totaling 11 lines :) > > Basically, now: > * If you navigate to the first message in a thread, no redirect at all is > done Woooo!!!! > * If you navigate to another message, there is a redirect to the # url but > using the md5 of the messageid keeping a lot shorter than your average > gmail messageid Yay. > Well, that's actually more than 4 lines of code per year, you can't expect > coding much faster than that! > > FWIW, I haven't purged caches so it will gradually start showing up on > threads in the archives as time go by. Ok. Thanks! Stephen
Вложения
On Wed, Jun 20, 2018 at 10:57:10AM -0400, Stephen Frost wrote: > Greetings, > > * Magnus Hagander (magnus@hagander.net) wrote: > > On Fri, Oct 23, 2015 at 5:28 PM, Magnus Hagander <magnus@hagander.net> > > wrote: > > > In fact, we could have a <a name> for each of those two, so that one could > > > still use the other one if building URLs elsewhere, but the ones generated > > > in the archives could use the shorter id. That's a number that goes up to > > > max 6 digits at this point (and that would actually be guaranteed to be > > > stable in the future, unlike just using the sequential) > > > > So, do I win anything for best zombie thread back from the dead today? > > I think you do. > > > It's only been a few years, so I've now actually done this in the shape of > > two tiny commits and I think totaling 11 lines :) > > > > Basically, now: > > * If you navigate to the first message in a thread, no redirect at all is > > done > > Woooo!!!! > > > * If you navigate to another message, there is a redirect to the # url but > > using the md5 of the messageid keeping a lot shorter than your average > > gmail messageid > > Yay. Yes, those URLs were getting very long to post in emails. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +