Cleaning MSIE7 cache using VBA from within MS Word 2003

G

[Gizmo]

Hi guys,

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


VBA:

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

VBA tags courtesy of www.thecodenet.com

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
 
G

[Gizmo]

Hi Paul,

Unfortunately access to the MS IE cache has been disabled by the
administrator as well...(which is brilliant by the way, as I have a MSIE7
cache with 650Mb in size!!! - what a waste!)

Anyway, I found a good solutions to avoid "hits" in the cache!!!

Whenever I am generating the URL, I just simulate passing a dummy parameter
which has a random string (20 chars in length) as value. Something like this:

http://my.server.com/mypage.html?dummyParameter=<random_string>

This way, I am tricking MSIE to "think" that it's a different URL, so it
doesn't produce a "hit" in the local file cache!!!

It's a dirty solution, but maybe somebody needs it as well!

Thanks again,

Gizmo

PS: If by some reason, somone needs a piece of "randomizing code" to
generate a string, here it:

******************************************
'This method generates a random string, given a length
Function GenerateRandomString(iLength As Integer) As String
Dim i As Integer, iTemp As Integer, bOK As Boolean, strTemp As String
'48-57 = 0 To 9, 65-90 = A To Z, 97-122 = a To z
'amend For other characters If required
For i = 1 To iLength
Do
iTemp = Int((122 - 48 + 1) * Rnd + 48)
Select Case iTemp
Case 48 To 57, 65 To 90, 97 To 122: bOK = True
Case Else: bOK = False
End Select
Loop Until bOK = True
bOK = False
strTemp = strTemp & Chr(iTemp)
Next i
GenerateRandomString = strTemp
End Function
******************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top