[removed] Disable caching of response from server to HTTP GET URL request

后端 未结 3 1938
一整个雨季
一整个雨季 2020-12-06 11:31

I want to turn off the cache used when a URL call to a server is made from VBScript running within an application on a Windows machine. What function/method/object do I use

3条回答
  •  难免孤独
    2020-12-06 12:04

    If you have control over the application targeted by the XMLHTTP Request (which is true in your case), you could let it send no-cache headers in the Response. This solved the issue in my case.

    Response.AppendHeader("pragma", "no-cache");
    Response.AppendHeader("Cache-Control", "no-cache, no-store");
    

    As alternative, you could also append a querystring containing a random number to each requested url.

提交回复
热议问题