how can I disable the browser cache?

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

how can I disable the browser cache?

Postby yanyuejie » Mon Jan 13, 2014 4:43 am

Already set the CefBrowserSettings.application_cache = STATE_DISABLED, but it doesnot work. there is still a lot of cached files has been saved to the cache_path. I donot want modify the response (the cache-control)from the server , is there any solution? and what does the CefBrowserSettings.application_cache mean by the way.
thanks.
yanyuejie
Techie
 
Posts: 29
Joined: Fri Jul 26, 2013 4:43 am

Re: how can I disable the browser cache?

Postby yanyuejie » Mon Jan 13, 2014 5:13 am

I used the getResourceHandler+CefURLRequest to filter and modify the response. in the CefResourceHandler.GetResponseHeaders, i just set the MimeType and status for the response. but the response still be cached, is the CefURLRequestClient.OnRequestComplete be called after the cache process?
yanyuejie
Techie
 
Posts: 29
Joined: Fri Jul 26, 2013 4:43 am

Re: how can I disable the browser cache?

Postby yanyuejie » Mon Jan 13, 2014 7:06 am

excute CefRequest.SetFlags(UR_FLAG_SKIP_CACHE), half works, but the cache files are still increasing...
yanyuejie
Techie
 
Posts: 29
Joined: Fri Jul 26, 2013 4:43 am

Re: how can I disable the browser cache?

Postby magreenblatt » Mon Jan 13, 2014 10:56 am

yanyuejie wrote:excute CefRequest.SetFlags(UR_FLAG_SKIP_CACHE), half works, but the cache files are still increasing...

SetFlags only works with CefURLRequest. If you leave CefSettings.cache_path empty some data will be stored in-memory and some written to a temporary disk location. Not all components support storage of data in-memory.

yanyuejie wrote:and what does the CefBrowserSettings.application_cache mean by the way.

http://www.html5rocks.com/en/tutorials/ ... /beginner/
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 195 guests