MySQL Forums
Forum List  »  PHP

Re: MYSQL appears to not recache Selected table after Insert
Posted by: Barry Galbraith
Date: September 14, 2011 08:06AM

>select the same manufacturer and the AJAX query returns the same list as before with no new type

That's the MS IE caching feature (bug). You need to add a rand= to the ajax query string to make IE actually go and get the data, otherwise it will ALWAYS show you the old data.

I do it like this in javascript.

         var myurl = 'telltimeXML.php';
         myRand = parseInt(Math.random()*9999999999999999);
         var modurl = myurl+"?rand="+myRand;
         http.open("GET", modurl, true);

By adding a random number to the query string, IE will actuaclly re-get the data. Without it, you get the same old same old, every time.

Good luck,
Barry.

Options: ReplyQuote


Subject
Written By
Posted
Re: MYSQL appears to not recache Selected table after Insert
September 14, 2011 08:06AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.