Delphi Chromium Embedded - Clear browser cache

那年仲夏 提交于 2019-12-23 22:08:42

问题


I am using Delphi Chromium Embedded in my application. I have the following question: is there a way to clear cache of browser ?


回答1:


I also tried to NOT use the cache, by setting the options right. I set up both options (Page and Application cache) to Disabled, but still, my page was using the cache. The solution I found was to use

chromium1.RecreateBrowser(url);

This one cleared my cache.




回答2:


To avoid using cache: (1) do not set GlobalCEFApp.Cache in your program code and (2) set these two values before calling LoadURL:

Chromium1.CustomHeaderName  := 'Cache-Control';
Chromium1.CustomHeaderValue := 'no-cache';
Chromium1.LoadURL(aURL);


来源:https://stackoverflow.com/questions/16080509/delphi-chromium-embedded-clear-browser-cache

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!