Request destination for SVG documents
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 2.3k
- Forks
- 403
- Avg merge
- 21h 16m
- Merged PRs (30d)
- 4
Description
It's unclear what destination value should be used for SVG documents and different browsers seem to be doing different things, at least when it comes to CSP.
https://svg-discrimination.glitch.me/csp.html is loading fine in Chrome and Safari (as long as img-src: 'self' is there), but the SVG is blocked in Firefox.
At the same time, because SVG document resources are internally represented differently than images in Chromium, an as value of "image" for preloads is a mismatch for SVG documents.
Looking at Fetching the document over in SVG-land doesn't mention destination at all.
We should decide what the destination be, and then align spec and implementations on it.
My personal vote would be for a brand new destination (e.g. "svg" or "svg-document"), to make it easier to explain to developers which CSP or as values control these loads.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Fetch Standard's destination definitions and the linked SVG2 “Fetching the document” section. Compare those with the linked CSP reproduction and Chromium preload issue, then determine an agreed destination for SVG documents and what spec and implementation alignment would count as done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- api, security, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100