Greg Hewgill ([info]ghewgill) wrote,
@ 2005-03-23 01:24:00
Previous Entry  Add to memories!  Tell a Friend  Next Entry
Entry tags:rant, web

broken paradigm
You know what I hate about Gallery? It breaks the Back button. For example, go here. Then select page 2 (right above the date). Then hit the Back button. You would expect that you would go back to page 1, right? Nope, you're left staring at page 2 wondering why the Back button didn't work.

(Note: For the same reason that this is broken, going here might take you directly to page 2. If that's the case, select page 1 then hit the Back button.)

This is, of course, just one of the many things I hate about Gallery.



(17 comments) - (Post a new comment)


[info]eliset
2005-03-23 01:32 pm UTC (link)
Couldn't that be fixed pretty easily?

(Reply to this) (Thread)


[info]ghewgill
2005-03-23 02:35 pm UTC (link)
You'd think so, yes. But the design decision that produces this behaviour appears to be quite deliberate. At first the link is ".../gallery/sxsw2005". When you go to page 2, it changes to ".../gallery/sxsw2005?page=2". This appears to set your "current" page for the sxsw2005 gallery to page 2. When you go back to ".../gallery/sxsw2005", gallery just shows you the "current" page as last set. Which isn't page 1 anymore, but page 2. Surely they could have come up with a better design that didn't rely on server-side state for remembering which page was your "current" page. That sort of thing is supposed to be handled by the content of the URL.

An easy way to fix this would be to change Gallery to send an HTTP temporary redirect response when accessing the unqualified ".../gallery/sxsw2005" to the url for the current page, ie. ".../gallery/sxsw2005?page=1". That would preserve functionality and not end up breaking the Back button, because the browser wouldn't store the unqualified ".../gallery/sxsw2005" in its history.

(Reply to this) (Parent)(Thread)


[info]cetan
2005-03-23 07:06 pm UTC (link)
I've found the people that write the software to be pretty responsive on the gallery message board. Perhaps a note about it there would be in order. Worst that could happen is that they adopt the all-to-typical "our software is fine, the user is wrong" attitude. :)

(Reply to this) (Parent)(Thread)


[info]decibel45
2005-03-23 07:37 pm UTC (link)
They also seem to be without clue. For example, how on earth do you write exploits into a picture gallery?

Greg needs to add some gallery-like features to his photo gallery and release it on freshmeat or the like.

(Reply to this) (Parent)(Thread)


[info]cetan
2005-03-23 08:41 pm UTC (link)
Not being a programmer, I don't know how exploits can happen in any software. But it happens, even to the best of software packages.

(Reply to this) (Parent)


[info]equiraptor
2005-03-24 12:53 am UTC (link)
Isn't that controlled by a cookie? If I don't let a site running Gallery set cookies, it doesn't "remember" which page I'm on like that. Maybe they could add (if it isn't already there) an option to disable this setting of cookies server-side?

Sometimes I like that behavior, sometimes I don't. It's not enough to make me disable cookies on all sites running gallery, even thought that would take almost no work since my browser prompts me about cookies anyway... And I suspect disabling cookies on a Gallery site where I login would prevent me from logging in.

(Reply to this) (Parent)(Thread)


[info]ghewgill
2005-03-24 01:18 am UTC (link)
Yes, it appears the current page is stored in server-side state where the user is identified by a cookie. I haven't tested this with gallery, but usually PHP will embed the session ID in the URL if it finds that it can't set a cookie. All this might be configurable and up to the admin, I don't know.

(Reply to this) (Parent)


[info]cetan
2005-03-23 02:23 pm UTC (link)
Gallery is wonderful. :)

(Reply to this)


[info]cetan
2005-03-23 02:32 pm UTC (link)
For the same reason that this is broken, going here might take you directly to page 2

For the same reason? I was under the impression that this would only happen if the last time you visited the page you were on page 2 and then you clicked on the album link again. I don't think first time visitors ever are shown any page other than page 2 first. This has been my experience at least.

And yes, that "feature" of Gallery can be annoying. I think JWZ ranted about it once. But it's never bothered me enough to try and fix it :)

(Reply to this) (Thread)


[info]ghewgill
2005-03-23 02:36 pm UTC (link)
Yeah, I mentioned the note about the page 2 thing because I suspect that many of the readers here will have already visited the nucleartacos gallery in the recent past, and may have last viewed page 2. :)

(Reply to this) (Parent)(Thread)


[info]cetan
2005-03-23 02:56 pm UTC (link)
Oh, good point. :)

(Reply to this) (Parent)


[info]cowbert
2005-03-23 03:09 pm UTC (link)
javascript?

(Reply to this)


[info]_fool
2005-03-23 09:31 pm UTC (link)
your browser is broken =)

opera does the right thing. perhaps that is why i still tolerate gallery--i only ever use it in opera.

(Reply to this) (Thread)


[info]ghewgill
2005-03-24 01:19 am UTC (link)
It might also be that Opera is caching the album pages too aggressively, and the server would say "yes I have new content for that page" if only the browser would ask. :)

(Reply to this) (Parent)(Thread)


[info]_fool
2005-03-24 02:52 pm UTC (link)
oh, quite likely. i do hit reload more often than one might think would be necessary when i'm polling my LJ friends page for example. however, in this particular case it's a win =)

(Reply to this) (Parent)


[info]mskala
2005-03-24 02:03 am UTC (link)
It works for me. I have cookies disabled. It doesn't seem to embed a cookie in the URL; I'm pretty sure that PHP only will do that if some effort is taken by the page author to make it use the URL when cookies are disabled.

(Reply to this) (Thread)


[info]mskala
2005-03-24 02:04 am UTC (link)
Clarification: by "it works" I mean "the back button works, and does not display the broken behaviour you describe".

(Reply to this) (Parent)


(17 comments) - (Post a new comment)

Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…