Disable loading from cache for font files

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.

Disable loading from cache for font files

Postby damonkashu » Tue Mar 07, 2017 4:40 pm

See bug here:
https://bugs.chromium.org/p/chromium/is ... ?id=602968

It seems if a page and an iframe within it both load CSS that defines a font-face which reference the same source, text using that font renders as invisible in either the page or the iframe. https://bugs.chromium.org/p/chromium/is ... 602968#c14 seems to indicate that appending a query param to the font source URL is enough to trick the browser into skipping the cache and requesting the resource again, which seems to fix the issue.

The fix has been submitted in chromium 57 but we are locked to chromium 49 for XP support. We are in a situation where we have multiple iframes that try to define those same font-faces, and I thought I could achieve the cache skipping effect by appending the "Cache-Control: no-store" header to the response in GetResourceHandler(), when serving the initial font file.

Despite doing this though, I observe in the network inspector that subsequent requests for the font files will read as "from cache". Is there something else going on here that causes cef or chromium to hit the cache, despite the initial response having the correct cache-control headers? am I perhaps intercepting in the incorrect location?
damonkashu
Techie
 
Posts: 16
Joined: Tue May 24, 2016 8:26 pm

Re: Disable loading from cache for font files

Postby Czarek » Thu Mar 09, 2017 1:52 am

Try setting both no-cache and no-store in headers. Also check how it behaves in Google Chrome v49.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 43 guests