title: Caching and the WebBrowser control in .Net
body: <p>I'm using the WebBrowser control in .Net to execute some 3rd party affiliate marketing conversions.</p>
  
  <p>I have a queue table in a database with all the scripts/images to execute. I loop through all these in a WinForms app with the WebBrowser control. After I've executed a script/image I Dispose the WebBrowser control, set it to null, and renews it with a new WebBrowser control instance.</p>
  
  <p>Consider this URL: <a href="http://renderserver/RenderScript.aspx?id=1" rel="noreferrer">http://renderserver/RenderScript.aspx?id=1</a></p>
  
  <p>RenderScript.aspx displays an Image with a URL of e.g.: <a href="http://3rdparty/img.ashx?id=9343" rel="noreferrer">http://3rdparty/img.ashx?id=9343</a></p>
  
  <p>I use Fiddler to see all requests and responses, and when the same URL is executed twice, it uses some kind of cache. That cache exists underneath the WebBrowser control itself.</p>
  
  <p>This cache means that the img.ashx is not called.</p>
  
  <p>I tried using Internet Explorer to request the URL: <a href="http://renderserver/RenderScript.aspx?id=1" rel="noreferrer">http://renderserver/RenderScript.aspx?id=1</a> and hit F5. Then it is requested perfectly.</p>
  
  <p>But if I click the address bar and hits Enter to navigate to the same URL again - it is not requested. When I use Firefox is will request the page and image everytime no matter if I use F5 or navigate from the address bar.</p>
  
  <p>I found some Win32 API calls (<a href="http://support.microsoft.com/kb/326201" rel="noreferrer">http://support.microsoft.com/kb/326201</a>) that was able to clear the cache. It worked on my local machine. Then the app was deployed to a server running Windows Server 2003 Standard x64 (my own machine is Vista x86).</p>
  
  <p>And now the API calls to clear the cache doesn't work.</p>
  
  <p>Any ideas on why the API calls doesn't work on Windows Server, but works on Vista? Both machines running IE8.</p>