Created attachment 282923 [details] Example html file and screenshot, as on gist.github.com. I think I've found an odd bug in Safari related to the picture element and downloading multiple sources, which I've been advised may be a Webkit thing. See example html: https://gist.github.com/notlee/73ebe50c3af907f3cde875afd9cd61c1 Actual: For the picture element seen in the example above, both the webp source and jpeg img fallback downloads unless (oddly) you delete the script tag, remove the new line between the opening and closing of the script tag, or delete the link tag href contents. ¯\_(ツ)_/¯ Expected: The expected behaviour being to only download one picture source or the img element fallback. In this case ignore the webp picture source, given Safari doesn't support it, and therefore only download the jpeg img. Observed on: OSX 10.11.5 Safari Version 9.1.1 (11601.6.17) Safari Preview Version 9.1.2 (11601.7.4, 11602.1.37)
<rdar://problem/27301646>
Created attachment 321191 [details] Example using external javascript Just to confirm that this still appears to the an open issue. The example HTML from Lee worked fine for me, but a slightly modified one has the same issue. It looks like any external script BEFORE the picture tag causes the issue. Moving the script tag to after the picture tag seems to solve it. Observed on: OS X 10.12.6 Safari Version 10.1.2 (12603.3.8) Safari Technology Preview 39 (Safari 11.1, Webkit 12605.1.4.0.1) Webkit Nightly 222202 - with cache disabled (works if the external file is cached)
I believe this is a duplicate of bug 179231
This case isn't exactly identical, in that there are not multiple <source> elements, but it does seem similar, and may have been fixed by that change.
*** Bug 177068 has been marked as a duplicate of this bug. ***
*** Bug 215805 has been marked as a duplicate of this bug. ***
https://github.com/WebKit/WebKit/pull/31055 addresses this