Apple has been kind enough to provide a use case example of XMLHttpRequest in action. The functionality of this is almost exactly the same as what we are doing with the media in our admin. The code is fairly stripped down and reusable, which is great. Going through the code, the functions are called in this order:
I’m still playing with it, but intend to make it a little more universal (Apple’s implimentation has a few hardcoded variables in it that we should probably fix). I’ll post an updated version of this to our NMI Wiki for others to use when I have it done.
While this solves the Pull side of things, we still would like to solve the refresh on Push from a few things in our Admin as well. Luckly there’s something for us here, and it builds on XMLHttpRequest. It’s called AJAX. I’ll be looking into this shortly.