short: I am Newbie, but I try the best to ask straight forward, but please try to be forgiving with me ;)
I was searching for a solution to my problem for a while and two topics:
come close and show some wonderful solutions, unfortunately they do not work with my situation.
I need to send a CGI command to an IP Camera using the jQuery.ajax() call. I am getting and often changing result. So I can not allow the browser to cache the result! I know and often read about this option (see topic 1.):
$(document).ready(function() {
$.ajaxSetup({ cache: false });
});
But this doesn't work in my case, as the camera CGI command structure does not work with the timestamp attached to the command. So instead of getting the answer I need, I will get an error.
After that I thought, I can adopt the jQuery Code to remove the timestamp that is attached when you set the option 'cache: false'. But after I read some comments (see topic 2.):
So if you use cache: false, jQuery just add an additional parameter to the URL with a current time. It makes for the local browser the URL another as it probably has in the local cache and it forward the request to the server. Nothing more.
So I figured out that would not help me neither.
One solution of topic 2 would be to add "Cache-Control" equal to "max-age=0", which switch off local cashing, in the server response header. But again it simply does not work for me, as I have no access or whatsoever to the Software of the IP Camera.
I think one solution would be to deactivate or delete the caching for that specific call. Another solution might be to stop the caching by any other way.
So does anybody have an idea, how I can make the web browser stop using the cached answers, when I call the ajax event two times in a row? (reload the site would help, but is also a no go in that case).
Thanks for all the answers in advance, if you need more information to make my problem more clear, feel free to ask.
regards, lihume