[Webkit-unassigned] [Bug 169274] [link preload] Double downloads of preloaded CSS

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 7 10:07:31 PST 2017


--- Comment #8 from Yoav Weiss <yoav at yoav.ws> ---
(In reply to comment #7)
> (In reply to comment #5)
> > Maybe you can track if the preload has been already been used and if so
> > require full charset match (or reload)? Or maybe just reset the link-preload
> > bit on the first match?
> Yeah, took that route and turned off the flag when reusing a charset
> mismatch.
> > 
> > A better, more complicated solution would be to support multiple charsets on
> > CachedResource level. Clients would provide charset as a parameter on all
> > accesses to decoded strings.

I'm thinking about taking the second route, as it seems cleaner (thinking about it some more, turning off the flag in the charset case seems arbitrary).

Looking at the various CachedResource types it seems like:
* CachedCSSStyleSheet never reuses decoded text.
* Scripts do reuse previously decoded text.
* SVG never reuses decoded text.
* XSLT do reuse previously decoded text.

So, I think that simply getting rid of the internal representation of the decoded text whenever there's an encoding change can be enough to maintain charset correctness.

Let me know what you think.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170307/f0c185c2/attachment.html>

More information about the webkit-unassigned mailing list