Thread: Remembering the last used mirror
Hi! I've added code to remember the last mirror used (using a cookie) and automatically download from that mirror the next time the same user comes in to the site. You can see it in action at http://magnus-master.pgadmin.org/ftp/. Right now, it's set to redirect to the last used mirror after 5 seconds. Before I commit the code, does anybody have a different idea on how long that time should be? (Or for that matter, does anybody think this whole thing is a crappy idea?) //Magnus
> ------- Original Message ------- > From: Magnus Hagander <magnus@hagander.net> > To: PostgreSQL www <pgsql-www@postgresql.org> > Sent: 18/03/07, 19:41:35 > Subject: [pgsql-www] Remembering the last used mirror > > (Or for that matter, does anybody think this whole > thing is a crappy idea?) Yes, we used to do that and it was a real pita that caused nothing but trouble. Please do not commit. /D
Dave Page wrote: > >> (Or for that matter, does anybody think this whole >> thing is a crappy idea?) > > Yes, we used to do that and it was a real pita that caused nothing but trouble. Really? That must've been before my time, 'cuz I don't remember any of that. Out of curiosity, exactly what were the issues, if you recall? (Not questioning you, just want to know given that so many others to it that way..) > Please do not commit. Ok, I won't. //Magnus
Magnus Hagander wrote: > Dave Page wrote: >>> (Or for that matter, does anybody think this whole >>> thing is a crappy idea?) >> Yes, we used to do that and it was a real pita that caused nothing but trouble. > > Really? That must've been before my time, 'cuz I don't remember any of > that. It almost certainly was, back when Vince did most of the web stuff. > Out of curiosity, exactly what were the issues, if you recall? > (Not questioning you, just want to know given that so many others to it > that way..) Well it was slightly different back then so what you have now may be OK - I just want to make sure it's gonna work this time before inadvertently annoying people! Back then, the front page of the website was an auto-redirect to one of the mirror sites. This used to lead to two problems: - If the site you got directed to was down or slow, it was a nightmare to get to another mirror because the auto-redirect kicked in instantly when you hit the back button. This shouldn't be a problem this time as now I'm in a position to look at what you've done, I can see you display the page, a warning and give a delay before redirecting. - After the auto-redirect had kicked in, some browsers (notably, IE) misbehave and won't respond to the stop or back button for some time - seemingly whilst they wait for the initial connection to succeed or timeout. This could also be a PITA, but should be purely a browser issue with the delay you've included (it magnified the annoyance levels caused by the bad design previously). So I *think* the main issues that auto-redirecting had last time round are not problems with your code. One thought that does spring to mind though, what happens if the mirror used previously has dropped out of use when you return? Will it still default to it? Regards, Dave.
On Mon, Mar 19, 2007 at 08:51:48AM +0000, Dave Page wrote: > Magnus Hagander wrote: > > Dave Page wrote: > >>> (Or for that matter, does anybody think this whole > >>> thing is a crappy idea?) > >> Yes, we used to do that and it was a real pita that caused nothing but trouble. > > > > Really? That must've been before my time, 'cuz I don't remember any of > > that. > > It almost certainly was, back when Vince did most of the web stuff. That was certainly way back. And I *do* remember there being problems around that. I thoguht yo were referring to ftp downloads specifically. > > Out of curiosity, exactly what were the issues, if you recall? > > (Not questioning you, just want to know given that so many others to it > > that way..) > > Well it was slightly different back then so what you have now may be OK > - I just want to make sure it's gonna work this time before > inadvertently annoying people! :-) Yeah, that's why I brought it up before I committed anything. > Back then, the front page of the website was an auto-redirect to one of > the mirror sites. This used to lead to two problems: > > - If the site you got directed to was down or slow, it was a nightmare > to get to another mirror because the auto-redirect kicked in instantly > when you hit the back button. This shouldn't be a problem this time as > now I'm in a position to look at what you've done, I can see you display > the page, a warning and give a delay before redirecting. Right, this is the very reason why I want to discuss that timeout of 5 seconds. It will direct you off there in 5 seconds. If the site is very slow, you can click on another link. If the site is 404 (but hasn't been picked up by the mirror checkign script yet), you will get redirected to that 404 page. But at least in my tests with firefox, if I then hit back, I get to the mirror list and it will *not* redirect me again. But that's a client-side thing, so it might be different in different browsers. > - After the auto-redirect had kicked in, some browsers (notably, IE) > misbehave and won't respond to the stop or back button for some time - > seemingly whilst they wait for the initial connection to succeed or > timeout. This could also be a PITA, but should be purely a browser issue > with the delay you've included (it magnified the annoyance levels caused > by the bad design previously). I haven't seen that with any other sites, so maybe it's just been fixed in more recent versions of the browsers. There have been a couple coming out since that time :-) > So I *think* the main issues that auto-redirecting had last time round > are not problems with your code. > > One thought that does spring to mind though, what happens if the mirror > used previously has dropped out of use when you return? Will it still > default to it? No, then it will not show a default mirror at all - it will look like you had never picked a mirror. I'll attach a diff for the actual code, so you can check that part out. Should've done that the first time :-) //Magnus
Attachment
Magnus Hagander wrote: > No, then it will not show a default mirror at all - it will look like > you had never picked a mirror. OK, that's good, and I can't see any of the previous issues, so objection withdrawn. > I'll attach a diff for the actual code, so you can check that part out. > Should've done that the first time :-) Woulda helped :-) Just one thing - I'm not sure I like the way the flags look with the two lines of text below them now - can you do a mockup with the country name above, and the links below please? /D
On Mon, Mar 19, 2007 at 09:22:12AM +0000, Dave Page wrote: > Magnus Hagander wrote: > > No, then it will not show a default mirror at all - it will look like > > you had never picked a mirror. > > OK, that's good, and I can't see any of the previous issues, so > objection withdrawn. > > > I'll attach a diff for the actual code, so you can check that part out. > > Should've done that the first time :-) > > Woulda helped :-) > > Just one thing - I'm not sure I like the way the flags look with the two > lines of text below them now - can you do a mockup with the country name > above, and the links below please? Kinda like that? Or should we consider removing the text completely? It's there as an alt tag on the image for text browsers already, which will also cause a popup tooltip in IE. IIRC, we can set the title attribute to give such a tooltip in other browsers.. //Magnus
Magnus Hagander wrote: > On Mon, Mar 19, 2007 at 09:22:12AM +0000, Dave Page wrote: >> Magnus Hagander wrote: >>> No, then it will not show a default mirror at all - it will look like >>> you had never picked a mirror. >> OK, that's good, and I can't see any of the previous issues, so >> objection withdrawn. >> >>> I'll attach a diff for the actual code, so you can check that part out. >>> Should've done that the first time :-) >> Woulda helped :-) >> >> Just one thing - I'm not sure I like the way the flags look with the two >> lines of text below them now - can you do a mockup with the country name >> above, and the links below please? > > Kinda like that? > > Or should we consider removing the text completely? It's there as an alt > tag on the image for text browsers already, which will also cause a > popup tooltip in IE. IIRC, we can set the title attribute to give such a > tooltip in other browsers.. Yeah, I think that would be better. Regards, Dave
Dave Page wrote: > Magnus Hagander wrote: >> On Mon, Mar 19, 2007 at 09:22:12AM +0000, Dave Page wrote: >>> Magnus Hagander wrote: >>>> No, then it will not show a default mirror at all - it will look like >>>> you had never picked a mirror. >>> OK, that's good, and I can't see any of the previous issues, so >>> objection withdrawn. >>> >>>> I'll attach a diff for the actual code, so you can check that part out. >>>> Should've done that the first time :-) >>> Woulda helped :-) >>> >>> Just one thing - I'm not sure I like the way the flags look with the two >>> lines of text below them now - can you do a mockup with the country name >>> above, and the links below please? >> Kinda like that? >> >> Or should we consider removing the text completely? It's there as an alt >> tag on the image for text browsers already, which will also cause a >> popup tooltip in IE. IIRC, we can set the title attribute to give such a >> tooltip in other browsers.. > > Yeah, I think that would be better. Applied. Feel free to rip it apart :-) //Magnus