Bug 186316
Summary: | Tinder.com sometimes gets the wrong fonts | ||
---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> |
Component: | Service Workers | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | beidson, cdumez, mmaxfield, webkit-bug-importer, youennf |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Chris Dumez
Once a tab is in a bad state, it does not recover unless you shift-reload, so it could be memory cache related. Other tabs loaded at the same time work fine even though they use the same registration / service worker.
Looks like the issue could be related to a stylesheet missing: style.<SHA>.css according to WebInspector. It does not reproduce 100%, it is flaky. But once it occurs in a tab, this tabs stays in the bad state.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/40818514>
Chris Dumez
I haven't been able to reproduce yet but I do see the following in the console:
The resource https://tinder.com/static/build/style.2d2101fd39f2a8cf9be861384dd3e7f1.css was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it wasn't preloaded for nothing.
Could be an interaction between service workers and preloading?
Chris Dumez
Initially, style.2d2101fd39f2a8cf9be861384dd3e7f1.css is served by the service worker. Upon reloads, it comes from the memory cache.
Blowing away the memory cache using CND+Reload fixes it so this may indicate the service worker served us something bad and we stored it in the memory cache. Which would explain why following reload do not fix it (they keep getting the bad cached resource?).
Chris Dumez
Response:
ETag: W/"fa18-163b32ae960"
Age: 519208
X-WebKit-CSP: default-src *; script-src * 'unsafe-inline'; style-src * 'unsafe-inline' blob:; img-src * data: blob:
X-Frame-Options: SAMEORIGIN
Content-Encoding: gzip
X-DNS-Prefetch-Control: on
X-XSS-Protection: 1; mode=block
Content-Security-Policy: default-src *; script-src * 'unsafe-inline'; style-src * 'unsafe-inline' blob:; img-src * data: blob:
Content-Type: text/css; charset=UTF-8
Vary: Accept-Encoding
Via: 1.1 2a47832c458ab2a6b20c8363f5aa35ea.cloudfront.net (CloudFront)
Last-Modified: Wed, 30 May 2018 22:28:44 GMT
Date: Wed, 30 May 2018 22:36:27 GMT
Referrer-Policy: origin-when-cross-origin
Cache-Control: public, max-age=31536000, immutable
Accept-Ranges: bytes
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=15552000; includeSubDomains
Server: nginx/1.12.1
x-download-options: noopen
x-amz-cf-id: xOz9jtSLtpkIqXyTjQL5Wu8_P8nQDb9SGe_2DmB_LUS8z28Cy2tvBQ==
x-cache: Hit from cloudfront
x-content-security-policy: default-src *; script-src * 'unsafe-inline'; style-src * 'unsafe-inline' blob:; img-src * data: blob:
Note that the resource has Cache-Control: immutable. As a result, if we had something bad cached locally, a reload would not help recover because we would not revalidate until the resource has expired (and max-age is pretty high).
Chris Dumez
Note that the issue is that the fonts used are not right. For one of the elements, I looked at its font:
font-family: ProximaNova,sans-serif;
Which comes from https://tinder.com/static/build/style.2d2101fd39f2a8cf9be861384dd3e7f1.css
This seems to confirm that the issue is related to this stylesheet.
Myles C. Maxfield
(In reply to Chris Dumez from comment #5)
> Note that the issue is that the fonts used are not right. For one of the
> elements, I looked at its font:
> font-family: ProximaNova,sans-serif;
>
> Which comes from
> https://tinder.com/static/build/style.2d2101fd39f2a8cf9be861384dd3e7f1.css
>
> This seems to confirm that the issue is related to this stylesheet.
Do you have Proxima Nova locally-installed? https://trac.webkit.org/changeset/233447/webkit
Chris Dumez
(In reply to Myles C. Maxfield from comment #6)
> (In reply to Chris Dumez from comment #5)
> > Note that the issue is that the fonts used are not right. For one of the
> > elements, I looked at its font:
> > font-family: ProximaNova,sans-serif;
> >
> > Which comes from
> > https://tinder.com/static/build/style.2d2101fd39f2a8cf9be861384dd3e7f1.css
> >
> > This seems to confirm that the issue is related to this stylesheet.
>
> Do you have Proxima Nova locally-installed?
> https://trac.webkit.org/changeset/233447/webkit
I was never able to reproduce. It was reported at WWDC.
Myles C. Maxfield
*** This bug has been marked as a duplicate of bug 187228 ***