sazzie Posted January 4, 2007 Share Posted January 4, 2007 Imagine that you have a php server script which will do all the processing of an ajax application.We send off the request using something like the following : [color=red]request.open("GET", page_url, true);[/color]What I want to know is, is it possible to send my request to a persistant 'object' of page_url so all other requests willuse the same persistent data instead of each request using a different object of page_url?I want to achieve a common data status amongst all my calls to page_url so all my users can view each others' information.Thanks Quote Link to comment Share on other sites More sharing options...
ober Posted January 4, 2007 Share Posted January 4, 2007 Is there a reason you couldn't do some sort of "session" management on the backend? Use a database or a flatfile instead of a live object? Quote Link to comment Share on other sites More sharing options...
sazzie Posted January 4, 2007 Author Share Posted January 4, 2007 Because I'm new to ajax, I don't really know how best to go about implementing the persistence I'm looking for.Inaddition, the kind of information I want my users to share is by nature kind of large.I guess you've already helped by suggesting a database.Thanks a bunch ;)ps: I'd appreciate your help with the "Firefox Vs IE" issue from yesterday. Still desperate for help Quote Link to comment Share on other sites More sharing options...
ober Posted January 4, 2007 Share Posted January 4, 2007 Well, then I'd suggest you use the database to do your tracking and handle the actual content/objects through normal file management.AJAX isn't going to allow you to use a persistent object because it is by nature, a back-and-forth protocol. It doesn't execute all at once so it cannot retain information. You're making a call to something, it executes and returns something. That's how it works. It's not like using a PHP class that executes all at once calling back and forth to itself before generating a bunch of content one time. Quote Link to comment Share on other sites More sharing options...
fish123456 Posted May 15, 2007 Share Posted May 15, 2007 [quote author=sazzie link=topic=120975.msg496762#msg496762 date=1167911617]Imagine that you have a php server script which will do all the processing of an ajax application.We send off the request using something like the following : [color=red]request.open("GET", page_url, true);[/color]What I want to know is, is it possible to send my request to a persistant 'object' of page_url so all other requests willuse the same persistent data instead of each request using a different object of page_url?I want to achieve a common data status amongst all my calls to page_url so all my users can view each others' information.Thanks[/quote]Hi, I am actually interested in doing the same thing as you are (or were depending on whether you still want to do this). Have you figured out how to persist objects so that users can share the data without hitting a DB every time? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.