Created attachment 462466 [details] XHTML variant that demonstrates the problem First up, this is quite possibly a dupe of bug #159484, but as the trigger is different I’ll start with filing this issue separately. Given a page with a picture element with a source element that references a different resource to the img element, both referenced resources will be downloaded if the page is served as an XHTML document with the appropriate xmlns. I’ve attached a couple of test files that demonstrate the problem. This was observed in the wild on https://standardebooks.org/ebooks, which doesn’t contain any JS (trigger from bug #159484) and is served as XHTML.
Created attachment 462467 [details] HTML variant that works correctly
Only difference I can find between these two test is: <html xmlns="http://www.w3.org/1999/xhtml"> vs <html> and both have issues while pasting the code in W3C validator: https://validator.w3.org/#validate_by_input - Can you share an example with working images in it and reproducible test case in both cases, I don't get any difference. Thanks!
What's important here is that the attachments are served with different content types. application/xhtml+xml means that the document is handled as XHTML. To see the problem, one needs to check errors in Web Inspector. One subresource loading error means passing; two errors means failing. This does reproduce.
(In reply to Alexey Proskuryakov from comment #3) > What's important here is that the attachments are served with different > content types. application/xhtml+xml means that the document is handled as > XHTML. > > To see the problem, one needs to check errors in Web Inspector. One > subresource loading error means passing; two errors means failing. This does > reproduce. Thanks for your input.. New learning for me. Will account for in future testing. :-)
<rdar://problem/100444926>
Note: standardebooks.org (referenced in the original comment) has now been adjusted to not serve any source elements to Safari, effectively bypassing this problem. The bug still stands with the testcases.