Frank ist seams like it's a caching problem

This is a note for myself but it could be useful for anybody writing some
Ajax calls.

If you use a GET method to send an asynchronous request to your server side
code, if you don't do anything Internet Explorer will cache locally your
request, so obviously you won't have the latest result in your response.

So instead of scripting something like this in Javascript (unless you use a
POST method):

var url = 'GetCustomers.aspx?country=ireland'

use this:

var url = 'GetCustomers.aspx?country=ireland'  + *"&dummy=" + new
Date().getTime();*

This will force IE to show a fresh version of your request all the time.
Firefox doesn't seem to have this problem apparently.


What I don´t know is how to put that parameter in the retrieveURL function

<a href="#" 
onclick="retrieveURL('actualizarCamposForm.do?paso=paso1','PersonaForm')">Click
Here</a>

I can obtain the getTime value like this:
<% long time= new Date().getTime(); %>

but how i can put in here that value:


<a href="#" onclick="retrieveURL('actualizarCamposForm.do?paso=paso1&time=
time??','PersonaForm')">Click Here</a>

Thanks for all the help Frank

Reply via email to