CSS <<url>> create multiple requests with different URL fragments

NEW
Unassigned

Status

()

Core
CSS Parsing and Computation
a year ago
10 months ago

People

(Reporter: jkt, Unassigned, NeedInfo)

Tracking

52 Branch
Points:
---

Firefox Tracking Flags

(firefox52 wontfix)

Details

(URL)

(Reporter)

Description

a year ago
Creating a document with the following code:

<div thing>hey</div>
<style>
@import 'https://resources.whatwg.org/standard.css';
@import 'https://resources.whatwg.org/standard.css';
@import 'https://resources.whatwg.org/standard.css#1';
@import 'https://resources.whatwg.org/standard.css#2';

[thing] {
  color: red;
  background: url(https://resources.whatwg.org/logo.svg);
}
div {
    background: url(https://resources.whatwg.org/logo.svg#);
}
body {
    background: url(https://resources.whatwg.org/logo.svg#2);
}
</style>

This creates 2 logo requests and 3 import requests, chrome however only loads each resource once.

Demo URL: http://codepen.io/anon/pen/ozkvak
It should be straightforward enough to make the per-document style sheet cache in mozilla::css::Loader key off URIs ignoring their fragments.  I wonder what browsers other than Chrome do?

I don't know about imagelib caching.  Edwin, do you know if we should be making three separate requests for those SVG images?
Flags: needinfo?(edwin)
Too late for firefox 52, mass-wontfix.
status-firefox52: affected → wontfix
You need to log in before you can comment on or make changes to this bug.