NEW 245411
Multiple picture sources downloading when page is served as XHTML
https://bugs.webkit.org/show_bug.cgi?id=245411
Summary Multiple picture sources downloading when page is served as XHTML
Robin Whittleton
Reported 2022-09-19 23:18:10 PDT
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.
Attachments
XHTML variant that demonstrates the problem (209 bytes, application/xhtml+xml)
2022-09-19 23:18 PDT, Robin Whittleton
no flags
HTML variant that works correctly (178 bytes, text/html)
2022-09-19 23:18 PDT, Robin Whittleton
no flags
Robin Whittleton
Comment 1 2022-09-19 23:18:29 PDT
Created attachment 462467 [details] HTML variant that works correctly
Ahmad Saleem
Comment 2 2022-09-23 13:23:32 PDT
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!
Alexey Proskuryakov
Comment 3 2022-09-24 16:18:39 PDT
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.
Ahmad Saleem
Comment 4 2022-09-24 16:20:10 PDT
(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. :-)
Radar WebKit Bug Importer
Comment 5 2022-09-26 23:19:18 PDT
Robin Whittleton
Comment 6 2022-09-26 23:25:43 PDT
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.
Note You need to log in before you can comment on or make changes to this bug.