• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to persist data on client side

 
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ranchers
I am developing a web application thought of a situation as in any AJAX call we have to go to server to fetch the data, so why not to persist the data which is going to be used frequently by the user. In order to do so , I wanna to persist the data on client side. May be in XML format.
Can anyone please tell me whether it is possible to store the data on client side in the XML format. And then fetch the data from that XML and show it to client . All this should be like a blackbox to the end user. I mean user should not be aware from where exactly his/her data is fetched from.
Any white paper any link will be greatly be apprieciated.
Thanks in advance
SAmir
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Persist for what duration? For the current session you can use JavaScript. This is quite common in Ajax. If the persistence needs to span over multiple sessions you could try using cookies for this.
 
samir ware
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Rob,
Thanks for the reply. I want to persist my data in XML and that too across sessions. Is it not possible to save XML on client side at some perdefined location and use it as Database.
Thanks
Samir
 
Rob Spoor
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Web servers have no access to the local file system except through cookies. Only with techniques like (signed!) applets, OCX controls and the like is it possible.
I'm not sure but I think you can store XML in cookies. That meets all your requirements except the specified location.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd also be pretty wary of storing anything locally that could change on the server side without some sort of invalidation check.
 
Too many men are afraid of being fools - Henry Ford. Foolish tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic