
Skin CSS URL loaded multiple times (JW 7)
The documentation recommends against configuring the skin via URL (e.g. skin.url), as this can impact player setup performance. Makes sense.
In the event you need to rely on this method, note that if there are _multiple_ players (for example, 3 players) on the page using the same configuration setup, the associated CSS will also be loaded just as many times as there are players (even when using the _same_ skin.url between player instances) e.g.
CONFIG:
skin: {
name: 'custom',
url: '/path/to/custom.css' // Relative URL
}
RESULT:
<head>
<link type="text/css" rel="stylesheet" href="/path/to/custom.css">
<link type="text/css" rel="stylesheet" href="/path/to/custom.css">
<link type="text/css" rel="stylesheet" href="/path/to/custom.css">
...
</head>
However, provided you do _not_ use a relative URL, and enter a fully qualified URL (containing http(s)://) under the same circumstances, the CSS is luckily only loaded once.
CONFIG:
skin: {
name: 'custom',
url: 'https://domain.com/path/to/custom.css' // Fully qualified URL
}
RESULT:
<head>
<link type="text/css" rel="stylesheet" href="https://domain.com/path/to/custom.css">
...
</head>
Is it the intended behavior to duplicate relative skin.url like that?