I'm using AJAX in a certain page. The function calls a php file that selects data from a certain table and writes the result into a div. My problem is that when I update the DB table and add items to it, the AJAX function doesn't display the new data. I have to clear my chache and then it displays everything properly. Is there a way to work around this problem?
Ad a random dummy variable to the request URL. xml.open('GET', 'file.php?r=' + Math.floor(Math.random() * 1000)); Code (javascript):