0

I use the following code to copy a certain line of text from the website listed.

    'Track A
    Dim TrackA As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("https://pilotweb.nas.faa.gov/common/nat.html")
    Dim GaA As System.Net.HttpWebResponse = TrackA.GetResponse
    Dim WrA As System.IO.StreamReader = New System.IO.StreamReader(GaA.GetResponseStream)
    Dim ContentStrA As String = WrA.ReadToEnd
    Dim StartIndexA As Integer = ContentStrA.IndexOf(vbLf & "A ") + 1
    Dim StrLengthA As Integer = ContentStrA.IndexOf(vbLf, StartIndexA) - StartIndexA

However when I open the link in a tab in VB, it shows a version of the site from a few days ago, how do I prevent this from happening as I need the current version of the site?

Jambinator
  • 19
  • 5

1 Answers1

2

Change the Cache Policy of your System.Net.HttpWebRequest object, so that you're not getting cached results.

Alternatively, you can clear the cache for your URL.

Community
  • 1
  • 1
Robert Harvey
  • 178,213
  • 47
  • 333
  • 501