Nah, I didn't mean rude, more like trying to get away with a simple answer ;)
I still don't think it's worth the extra request and extra code, but that's your decision. I'll try. I don't think users care about a few extra lines of code, but it definitely could make the site behave more 'natural' while keeping the benefit of AJAX's speed. I think, in general it would be cool to have an option to make an AJAX call less asynchronous and force the browser's loading behavior when needed, without using such hacks. For now I'm thinking about a class, similar to Request.HTML that gets stuff into an iframe, loads it, then returns the content into onSuccess and removes the iFrame? Not AJAX, but might work - would that make sense? Cheers, Matt On Jul 9, 7:19 pm, Ryan Florence <[email protected]> wrote: > Now that I know what you're talking about, I'm 95% sure that facebook is > loading in iframes when you click those top tabs (like info, photos, etc). I > also give it as my opinion that the iframes are there for purposes other than > forcing the browser state to change, otherwise facebook would do that on > every ajax call, not just a couple of them. > > But there's your solution, as I mentioned before, just create an iframe and > load something that will never finish loading, then kill it when the request > is complete. I still don't think it's worth the extra request and extra > code, but that's your decision. > > > Is this email group about helping eachother and producing solutions to > > problems or just about forcefully trying to prove the one who asked a > > question is stupid? > > If David Walsh is asking the question, yes, the point is to prove the asker > is stupid. Otherwise, no, it's about helping people come to solutions. > > Sorry, most the time I'm busy at work and so I just type quick emails to try > to help out. The directness isn't meant to be rude, just quick. > > However, that brings up a valid point about what types of solutions we're > going to suggest. I have a hard time offering up a hack as a solution and > would rather find out the real problem and then help somebody implement a > real solution--not just what they think is the solution. > > Before you get all frustrated with responses that aren't what you expect, > keep in mind that a lot of the people on this group are professional web > developers, people working on high profile sites like monster energy, visa, > mtv, enterprise apps like cloudera's stuff, etc. So when they say "sounds > like you're doing something wrong" don't forget where the advice is coming > from. That's the best part about being involved with open source, > interfacing with arguably some of the best developers out there. Without the > help of people on this list I'd probably still be doing sites > forhttp://nealthebarber.com(best site evar!) > > And please remember, just because it sounds rude doesn't mean it is. It's > email, it can always sound rude :) > > On Jul 9, 2010, at 11:27 AM, bootle wrote: > > > Log in again, go to your profile, then click anything that would > > reload the main content area (for example Info or Photos in the > > topnav) and you will see what I'm talking about. In my first post I > > said that Facebook only does it for some calls. The AJAX call they use > > for it is a POST request:http://www.facebook.com/ajax/location_refresh.php > > > Is this email group about helping eachother and producing solutions to > > problems or just about forcefully trying to prove the one who asked a > > question is stupid? > > > Matt > > > On Jul 9, 5:53 pm, Ryan Florence <[email protected]> wrote: > >>>> I have some big calls that > >>>> reload almost all the page (like Facebook, to say) > > >> I had to log in to facebook for the first time in forever to see what > >> your'e talking about. > > >> Facebook either has a little indicator next to the link you clicked (which > >> is completely sufficient user feedback), or, in the case of moving to a > >> user's profile, it reloads the whole page. > > >> But facebook doesn't try to act like it's reloading the whole page when > >> it's not. > > >> On Jul 9, 2010, at 10:47 AM, bootle wrote: > > >>> How about just setting the document.body's css cursor property to > >>> the progress icon and then set it back when you're done? > > >>> I'm doing it now + setting the page's <title> to "Loading...", that > >>> doesn't give the exact feel I want to achieve though > > >>> I'm with Ryan here, I don't know what you're after. Can you point us > >>> to a > >>> site that behaves the way you want? I also agree: if you're loading an > >>> entirely new document via Ajax, you're doing it wrong. Just load a new > >>> document like normal. > > >>> For example Gmail and Facebook do it this way (Facebook only for the > >>> main page loads though). Notice that when you load a 'new page' in > >>> either of these the site never actually reloads, header and the chat > >>> area stay intact, only the content is loaded - despite that, browser > >>> displays all the loading whistles as with a classic page load - hope > >>> I'm explaining it well enough > > >>> I have just one call that I want to handle this way, as I wrote to > >>> Ryan, I think iframe might actually be a thing to experiment with. > > >>> Thanks, > >>> Matt > > >>> On Jul 9, 4:37 pm, Aaron Newton <[email protected]> wrote: > >>>> On Fri, Jul 9, 2010 at 8:24 AM, Trevor Orr <[email protected]> wrote: > >>>>> If I understand correctly you have multiple requests firing that replace > >>>>> most of the content on the page? Then I would guess you would to > >>>>> create and > >>>>> display a spinner and then have some way to figure out when the last > >>>>> request > >>>>> has completed and remove the spinner. > > >>>> The Group class lets you do that. > > >>>> How about just setting the document.body's css cursor property to > >>>> the progress icon and then set it back when you're done? > > >>>> I'm with Ryan here, I don't know what you're after. Can you point us to a > >>>> site that behaves the way you want? I also agree: if you're loading an > >>>> entirely new document via Ajax, you're doing it wrong. Just load a new > >>>> document like normal.
