Hi All Not specifically a scriptaculous question, but I was wondering how people were going about maintaining access to their applications via standard urls. Say for example I''ve a shop at www.shop.com, and its pure ajax to load in products. Now customer A wants to show a friend a product on the site - giving him the url www.shop.com and telling him to click on a series of links seems clunky. So what I''d like to do is for my ajax app (no its not a shop thats just an example!) to change the browser''s url to www.shop.com?product=xbox - which when my site loads it''ll pass this and load in the appropriate product info. The latter''s no problem, its simply how to write to the browser''s url window that I don''t know how to do (is this a server side or client site problem ). I''m working with PHP on a Linux box with modrewrite available. Cheers Rob
Rob Clayburn wrote:> Hi All > > Not specifically a scriptaculous question, but I was wondering how > people were going about maintaining access to their applications via > standard urls.Doh - as soon as you ask the question you find the answer: http://ajaxpatterns.org/Unique_URLs :D
This is an example of where I think Ajax is taken too far. I see no value in having a "pure" ajax solution for showing the product. If you are using pretty URL''s, it''s no big deal to perform a "true" request when changing products. On DevLists I sometimes have some data (i.e. a message) embedded in a larger page (i.e. a list of messages), and in that instance I need a perma-link button that will redirect to a page that just shows just the one message. Just my $0.02. On Tuesday, March 07, 2006, at 6:43 PM, Rob Clayburn wrote:>Hi All > >Not specifically a scriptaculous question, but I was wondering how >people were going about maintaining access to their applications via >standard urls. > >Say for example I''ve a shop at www.shop.com, and its pure ajax to load >in products. Now customer A wants to show a friend a product on the site >- giving him the url www.shop.com and telling him to click on a series >of links seems clunky. So what I''d like to do is for my ajax app (no its >not a shop thats just an example!) to change the browser''s url to >www.shop.com?product=xbox - which when my site loads it''ll pass this and >load in the appropriate product info. > >The latter''s no problem, its simply how to write to the browser''s url >window that I don''t know how to do (is this a server side or client site >problem ). I''m working with PHP on a Linux box with modrewrite available. > >Cheers >Rob >_______________________________________________ >Rails-spinoffs mailing list >Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffsCheers! --Dave Teare http://devlists.com - Email list management http://palmsphere.com - Apps for your hand-held -- Posted with http://DevLists.com. Sign up and save your time!
The shop was simply an example as i said in my post and I''d agree that doing an entire store in ajax is a poor idea. However, the technique I was after would allow the url in the title bar to accurately reflect the state of the page, whether that''s the post in a thread you were reading or a position in a gallery of images you were looking at. Dave Teare wrote:> This is an example of where I think Ajax is taken too far. I see no > value in having a "pure" ajax solution for showing the product. If you > are using pretty URL''s, it''s no big deal to perform a "true" request > when changing products. > > On DevLists I sometimes have some data (i.e. a message) embedded in a > larger page (i.e. a list of messages), and in that instance I need a > perma-link button that will redirect to a page that just shows just the > one message. > > Just my $0.02. > > On Tuesday, March 07, 2006, at 6:43 PM, Rob Clayburn wrote: > >> Hi All >> >> Not specifically a scriptaculous question, but I was wondering how >> people were going about maintaining access to their applications via >> standard urls. >> >> Say for example I''ve a shop at www.shop.com, and its pure ajax to load >> in products. Now customer A wants to show a friend a product on the site >> - giving him the url www.shop.com and telling him to click on a series >> of links seems clunky. So what I''d like to do is for my ajax app (no its >> not a shop thats just an example!) to change the browser''s url to >> www.shop.com?product=xbox - which when my site loads it''ll pass this and >> load in the appropriate product info. >> >> The latter''s no problem, its simply how to write to the browser''s url >> window that I don''t know how to do (is this a server side or client site >> problem ). I''m working with PHP on a Linux box with modrewrite available. >> >> Cheers >> Rob >> _______________________________________________ >> Rails-spinoffs mailing list >> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >> > > > Cheers! > --Dave Teare > http://devlists.com - Email list management > http://palmsphere.com - Apps for your hand-held > > >
Basically, you can''t change the URL in the address bar with javascript. This is something you should always take into account when you use partial page reloading (ajax) for navigation. I''ve seen some workarounds for increasing bookmarkability of ajax based apps by encoding page state in anchors (you can redirect to the same page with a different anchor to get some data into the URL bar but not have the page reload) but it isn''t for the faint-hearted... Tom Riley <http://www.smallroomsoftware.com> On 8 Mar 2006, at 01:07, Rob Clayburn wrote:> The shop was simply an example as i said in my post and I''d agree > that doing an entire store in ajax is a poor idea. > However, the technique I was after would allow the url in the title > bar to accurately reflect the state of the page, whether that''s the > post in a thread you were reading or a position in a gallery of > images you were looking at. > > Dave Teare wrote: >> This is an example of where I think Ajax is taken too far. I see >> no value in having a "pure" ajax solution for showing the >> product. If you are using pretty URL''s, it''s no big deal to >> perform a "true" request when changing products. >> >> On DevLists I sometimes have some data (i.e. a message) embedded >> in a larger page (i.e. a list of messages), and in that instance >> I need a perma-link button that will redirect to a page that just >> shows just the one message. >> >> Just my $0.02. >> >> On Tuesday, March 07, 2006, at 6:43 PM, Rob Clayburn wrote: >> >>> Hi All >>> >>> Not specifically a scriptaculous question, but I was wondering how >>> people were going about maintaining access to their applications via >>> standard urls. >>> >>> Say for example I''ve a shop at www.shop.com, and its pure ajax to >>> load >>> in products. Now customer A wants to show a friend a product on >>> the site >>> - giving him the url www.shop.com and telling him to click on a >>> series >>> of links seems clunky. So what I''d like to do is for my ajax app >>> (no its >>> not a shop thats just an example!) to change the browser''s url to >>> www.shop.com?product=xbox - which when my site loads it''ll pass >>> this and >>> load in the appropriate product info. >>> >>> The latter''s no problem, its simply how to write to the browser''s >>> url >>> window that I don''t know how to do (is this a server side or >>> client site >>> problem ). I''m working with PHP on a Linux box with modrewrite >>> available. >>> >>> Cheers >>> Rob >>> _______________________________________________ >>> Rails-spinoffs mailing list >>> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >>> >> >> >> Cheers! >> --Dave Teare >> http://devlists.com - Email list management >> http://palmsphere.com - Apps for your hand-held >> >> >> > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Check out Really Simple History: http://codinginparadise.org/projects/dhtml_history/README.html Now also adopted by google. Or an article published almost an year back: Fixing the Back Button and Enabling Bookmarking for AJAX Apps http://www.contentwithstyle.co.uk/Articles/38/fixing-the-back-button-and-enabling-bookmarking-for-ajax-apps Hope this helps! Thank you, Mandy.
Here''s another example with demo I have bookmarked. http://www.robertnyman.com/ask/ -- Bill Moseley moseley-kv6DSSSScSo@public.gmane.org
On 8 Mar 2006, at 13:24, Maninder, Singh wrote:> Check out Really Simple History: > http://codinginparadise.org/projects/dhtml_history/README.html >Yes, that''s the one i was thinking of.> Now also adopted by google.I''m curious - in which app? Tom Riley <http://www.smallroomsoftware.com>> > Or an article published almost an year back: > Fixing the Back Button and Enabling Bookmarking for AJAX Apps > http://www.contentwithstyle.co.uk/Articles/38/fixing-the-back- > button-and-enabling-bookmarking-for-ajax-apps > > Hope this helps! > > Thank you, > Mandy. > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
On 3/8/06, Tom Riley <tom-PBmQmKy+xGfg53LLcykzWA@public.gmane.org> wrote:> > > On 8 Mar 2006, at 13:24, Maninder, Singh wrote: > > > Check out Really Simple History: > > http://codinginparadise.org/projects/dhtml_history/README.html > > > > Yes, that''s the one i was thinking of. > > > Now also adopted by google. > > I''m curious - in which app? >GMail. No bookmarking, but they handle the [back] button.
On 8 Mar 2006, at 15:30, Nicolas Terray wrote:> On 3/8/06, Tom Riley <tom-PBmQmKy+xGfg53LLcykzWA@public.gmane.org> wrote: >> >> >> On 8 Mar 2006, at 13:24, Maninder, Singh wrote: >> >>> Check out Really Simple History: >>> http://codinginparadise.org/projects/dhtml_history/README.html >>> >> >> Yes, that''s the one i was thinking of. >> >>> Now also adopted by google. >> >> I''m curious - in which app? >> > > GMail. No bookmarking, but they handle the [back] button.I think they use frames and normal page reloading. At least as far as I can tell.. tom> _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
So, from what I had read, they are using this for Google Maps. Thanks, Mandy.
Also Backbase has a nice working implementation of this. Their demos use it.. pretty slick. E.g. http://www.backbase.com/demos/RSS/#aid=148504[1] Sam Bill Moseley wrote:>Here''s another example with demo I have bookmarked. > > http://www.robertnyman.com/ask/ > > > > >