2

I use this piece of code:

WebBrowser1.Navigate (url)

Dim html As String
html = WebBrowser1.Document.body.innerhtml  

And in the html of the page I even put the meta:

<meta http-equiv="cache-control" content="no-cache">

I tried doing as suggested here on similar SO question but neither of that helped for VB6.

Community
  • 1
  • 1
Nikola
  • 14,888
  • 21
  • 101
  • 165

1 Answers1

2

Try doing:

WebBrowser1.Navigate url, 4

The 4 turns off caching.

Mark Bertenshaw
  • 5,594
  • 2
  • 27
  • 40
  • Do you have a source for this? Maybe a link? – JimmyPena Jul 12 '12 at 17:47
  • The magic number `4` is defined as `navNoReadFromCache` and you should use that. Source? Documented right in the MSDN Library CDs that came with my copy of Visual Studio 6.0. Should be available at MSDN online as well. – Bob77 Jul 12 '12 at 18:55
  • Bob - sadly, the documentation for the original COM WebBrowser control has disappeared online. – Mark Bertenshaw Jul 13 '12 at 09:09
  • @BobRiemersma Every page I found with `navNoReadFromCache` says it is not implemented. Ex: [here](http://msdn.microsoft.com/en-us/library/ie/dd565688%28v=vs.85%29.aspx), [here](http://msdn.microsoft.com/en-us/library/aa768360(v=vs.85).aspx), [here](http://msdn.microsoft.com/en-us/library/dd565688(v=vs.85).aspx) – JimmyPena Jul 13 '12 at 20:43
  • And hard-coding the magic number *is* implemented, hmm? Why Micrososft left it out of the typelib I couldn't say, but you are expected to include the Enum yourself, inline within your programs. See http://msdn.microsoft.com/en-us/library/dd565688(VS.85).aspx – Bob77 Jul 14 '12 at 15:49