[Dancer-users] URI design question

Brian E. Lozier brian at massassi.com
Wed May 25 16:21:05 CEST 2011


On Wed, May 25, 2011 at 3:51 AM, David Precious <davidp at preshweb.co.uk> wrote:
> On Wednesday 25 May 2011 04:24:11 Brian E. Lozier wrote:
>> Yes, you use fragments on the end of the url, like:
>>
>> http://myapp.com/#books
>>
>> You can change it all you want and it doesn't do a reload of the page.
>>  Check sites like digg.com, click their "next page" button and you
>> will see it in action.
>
> IMO, that's a bit of a hack, abusing named anchors which are supposed to
> simply target a specific area of a given page, not cause different content to
> be loaded.
>
> e.g. http://myapp.com/#foo and http://myapp.com/#bar should serve up the same
> content, but the browser should scroll to the appropriate anchor.

Well the OP didn't ask my opinion on whether it was a good idea.  I
dislike pages that load the shell then use a bunch of ajax calls to
load all the different content areas.  It results in many more http
requests (which have significant overhead) and abusing anchors isn't
my favorite either.  The argument the other way is that the initial
page loads more slowly but as you stay on it and click around the
internal parts load faster.  I don't know of another way to change the
URL bar but not load the full page again.

> Maybe I'm just being old-school (damn kids, get off my lawn)
>
>
> --
> David Precious  ("bigpresh")
> http://www.preshweb.co.uk/
>
>   "Programming is like sex. One mistake and you have to support
>   it for the rest of your life". (Michael Sinz)
> _______________________________________________
> Dancer-users mailing list
> Dancer-users at perldancer.org
> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
>


More information about the Dancer-users mailing list