GetListItemChangesSinceToken where do you store the token?

Oct 13, 2014 at 6:12 PM
In following this tutorial by Marc on GetListItemChangesSinceToken:

I think I have a pretty good understanding of the concept and am even able to successfully follow the steps on the tutorial. It's my understanding that the initial execution of GetListItemChangesSinceToken will retrieve the changeToken string. But how can you leverage this so that the next time (say, 3 days later), GetListItemChangesSinceToken uses the same changeToken from 3 days earlier? Do you guys just store the string as a cookie? Or in a database?

Any guidance is much appreciated!

Oct 15, 2014 at 1:32 PM
Edited Oct 15, 2014 at 1:33 PM

As always, it depends. The token is just a string, so you can store it however you'd like. However, three days later, you may want to do a fresh request, anyway. I usually use my SPGetListItemsJson function (which uses GetListItemChangesSinceToken under the covers) on page load. It passes back the changeToken, and I use that for the lifespan of the page.

Oct 16, 2014 at 3:05 AM
Thank you Marc,

That makes a lot of sense.

I would love to share with you a project that I’ve been working on that would not have been possible without SPServices. Since it’s hosted on a VPN, I can only share screenshots. Any way I can email them to you privately?