:: Forum >>

Caching ActiveWidget

Hi guys!

I was wondering if I could disable caching active widget in IE 6. It has been a failure by putting those meta tags and jsp tags. Nothing seems to stop it from caching. Enlighten me please.

Thanks

Regards,
Nassa
Nassa
Tuesday, December 20, 2005
Does your case have an iframe? And are your asking it only for your development and testing environment? If so.. go to Tools->Inet Options...
General (tab)->Settings->Check for newer versions of stored pages->Every visit to the page

This should solve your problem
Md. Sheriff, Drivestream
Tuesday, December 20, 2005
Thanks Sheriff,

It did help me in my development stage. I was wondering if there is a code that does the same thing in the production environment. In this case, I wasn't using any iframe at all. It is just a plain jsp.

The main objective is : active widget should not be cached in IE.

Thanks again,

Regards,
Nassa
Nassa
Tuesday, December 20, 2005
Here is an article, Nassa,

http://www.aspnetresources.com/blog/cache_control_extensions.aspx

and here is another

http://www.ahinea.com/en/tech/ie-dhtml-image-caching.html

HTH
Md. Sheriff, Drivestream
Tuesday, December 20, 2005
I had the same problem. it is due to requesting the same url to retrive your data from the server. The key is to make every request unique. You can do this by adding a timestamp to the url request.

when creating the table and loading it the first time.
var D = new Date();
var url = "data.php?t=guest&m=" + D.getTime();
table.setURL(url);


by adding the &m=" D.getTime()" to the url it makes every request unique.

Here is a function I created to deal with all the problems I encountered with loading the grid with new data when grid is refreshed.
// REload the Members table with updated data
function load(url){
var Da = new Date();
url += "&m=" + Da.getTime(); // Done to deal with page cacheing
obj.clearRowModel(); // Clear Members Data Table to deal with polution
table.setURL(url); // Set the URL the Members table will read from
table.request(); // Tell Table to request the data
}


hope this helps.
David Gutierrez
Wednesday, December 21, 2005
I have exactly the same problem. I searched the internet so hard and could not find any direct answers. But only David Gutierrez's solution worked for me. Thanks a lot !

Jonathan @
http://www.digitalks.com
Jonathan Lee
Monday, December 4, 2006
We had a similar problem and implemented the same sort of technique. It's not that AW is caching the data - IE is caching the data. So by altering the URL and making it unique, it breaks the IE cache mechanism and loads the data file every time.

We have a timed event that needs the dataa to refresh. That's how we made it work. it was very frustrating until we figured out what was causing the data not to refresh.

It would be great if Alex altered his request code to automatically alter the url automatically (adding the parameter). Until then, David's solution works.
Carl
Monday, December 4, 2006
It's minor, but using

url+="&m"+Math.random();

instead of the date method saves a line of code.
David K
Tuesday, December 5, 2006
url+="&m"+Math.random();

The only possible problem with this thought it that it is not always guarenteed unique, that is

10 1 3 5 10 8 10

is a possible random sequence, hence the browser might invoke its cache for each instance when the random number was 10, whereas the time solution is always unique provided you don't do more than one request a second.
Mark H
Wednesday, December 20, 2006

This topic is archived.


Back to support forum

Forum search