PDA

View Full Version : Cleaning MSIE7 Cache using VBA



thygizmo
02-18-2009, 08:12 AM
Hi guys,

I am retrieving a jsp generated html using the following code:


Dim doc1 As HTMLDocument
Set doc1 = New HTMLDocument

Dim doc2 As HTMLDocument
Set doc2 = doc1.createDocumentFromUrl(Configuration.EDDIURL + "/" + theURL, "")


However, it seems to always use the cache (after getting the webpage for the first time)!!

To solve this, I was using a bunch of code to actually delete the MSIE6 cache...and it was working!

Now, my company decided to move into MSIE7....and the code for wiping my MSIE cache no longer works...

Anyone has an idea of how can it be done?

Cheers and many thanks!!

Gizmo

Oorang
02-20-2009, 08:13 AM
Does this do the trick?
http://www.visualbasic.happycodings.com/Files_Directories_Drives/code46.html

thygizmo
02-20-2009, 12:02 PM
Does this do the trick?
http://www.visualbasic.happycodings.com/Files_Directories_Drives/code46.html

Hi!

thanks for the TIP!

Actually I solved it in another way. I am now generating a random string (with 20 chars in length - composed by ["a"-"z", "A"-"Z"] chars) which I am appending to the URL as the value for "dummyParameter" parameter which I don't use at all.

My URL now looks like this:

http://www.myserver.com/myFile.html?dummyParameter=randomString

This way, I am tricking MSIE7 in thinking that it's always a new URL being called, so it never produces "hits" in the cache and actually makes the request to the WebServer!

Thanks anyway for your tip (I'll try it tomorrow and let you know)!

Cheers,

Gizmo