Bug 194948 - SVG load external file via <use> ignores ServiceWorker when offline
Summary: SVG load external file via <use> ignores ServiceWorker when offline
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Service Workers (show other bugs)
Version: Safari 12
Hardware: Mac macOS 10.12
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-02-22 09:40 PST by Laszlo
Modified: 2022-07-05 05:18 PDT (History)
7 users (show)

See Also:


Attachments
Example with one html and one svg file (8.54 KB, application/zip)
2019-02-22 09:40 PST, Laszlo
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laszlo 2019-02-22 09:40:37 PST
Created attachment 362727 [details]
Example with one html and one svg file

When referencing an external SVG (external.svg) inside an inline SVG inside an html file (index.html) via <use href="external.svg#someid"> and caching everything via ServiceWorker (cache.addAll(["index.html", "external.svg"])) the <use> tag does not display the cached version from the service worker when offline but displays nothing as if the file is not found.

But when accessing the svg directly via adress bar it can (of course) be loaded even when offline. Loading the external SVG via <img> tag does also work when offline. 

So it seems there is a bug when combining <use> tag an ServiceWorker.

I have attached an example. In other browsers (chrome and firefox) it works fine.
Comment 1 Radar WebKit Bug Importer 2022-07-01 15:45:04 PDT
<rdar://problem/96318522>
Comment 2 youenn fablet 2022-07-04 09:00:19 PDT
Pull request: https://github.com/WebKit/WebKit/pull/2056
Comment 3 EWS 2022-07-05 05:18:38 PDT
Committed 252132@main (c923ed26acc4): <https://commits.webkit.org/252132@main>

Reviewed commits have been landed. Closing PR #2056 and removing active labels.