How to disable the browser cache in WebBrowser
-
I am using The Windows Forms WebBrowser control in C#. I want to resynchronize or disable browser cache by customizing webBrowser. Needs to set the following flags: DLCTL_RESYNCHRONIZE or DLCTL_PRAGMA_NO_CACHE. The reference says that I need to implement IDispatch (referenced at http://msdn.microsoft.com/en-us/library/aa770041.aspx) I am not sure what interface of webBrowser control I need to use? Please send me if you have any info. Thanks, Ryan
-
I am using The Windows Forms WebBrowser control in C#. I want to resynchronize or disable browser cache by customizing webBrowser. Needs to set the following flags: DLCTL_RESYNCHRONIZE or DLCTL_PRAGMA_NO_CACHE. The reference says that I need to implement IDispatch (referenced at http://msdn.microsoft.com/en-us/library/aa770041.aspx) I am not sure what interface of webBrowser control I need to use? Please send me if you have any info. Thanks, Ryan
Please paste this code in page_load event Response.Expires = 0; Response.ExpiresAbsolute = DateTime.Now.AddDays(-1); Response.CacheControl = "no-cache"; Response.AddHeader("Pragma", "no-cache"); Response.AddHeader("cache-control", "private"); Let me know if you need more detail. Thanks, Arun
Arun Kr
-
Please paste this code in page_load event Response.Expires = 0; Response.ExpiresAbsolute = DateTime.Now.AddDays(-1); Response.CacheControl = "no-cache"; Response.AddHeader("Pragma", "no-cache"); Response.AddHeader("cache-control", "private"); Let me know if you need more detail. Thanks, Arun
Arun Kr
Thanks a lot, Arun. I am developing a flash application inside of webBrowser (that is in windows.forms). It seems that a page_load event and Response are used at the server side to clean cache. my webBrowser works at the client side. I used external WinInet library cleared the web browser cache. However, it does not work consistent. Is there a way to set these Pragma settings from client side? I am really appreciated your reply. -- Ryan