I’m building a javascript app for windows 8. I’m using jquery and knockout for my data binding.
So I have a list of data-binded elements, and I have a form that let’s me add new ones. If I use the form to add a new element it adds it on the server, but it won’t get on the list no matter what I do. I navigate away from the page, get back and stop on a breakpoint after the jquery get call that is supposed to return all elements, but it returns the list without the new one… And while on the breakpoint I manually call the same get from a browser and there the element is in the xml list.
So the jquery get call gets me the old list, without the new element, but the element is already added on the server’s list. Can this happen because jquery is caching the info and not making a new get call at all?
jQuery does cache ajax requests by default, but you can override it:
Read more: http://api.jquery.com/jQuery.ajax/