Created
July 6, 2016 18:14
-
-
Save notlee/73ebe50c3af907f3cde875afd9cd61c1 to your computer and use it in GitHub Desktop.
I think I've found an odd Safari bug. For the picture element in the example below, both the webp and jpeg images download unless 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. ¯\_(ツ)_/¯ The expected behaviour being to ignore the webp picture source and only…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Safari Bug: webp & jpeg download</title> | |
<link rel="stylesheet" href="anything-here-valid-or-not"> | |
</head> | |
<body> | |
<script> | |
</script> | |
<p> | |
For the picture element both the webp and jpeg images download unless 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. ¯\_(ツ)_/¯ The expected behaviour being to ignore the webp picture source and only download the jpeg fallback. | |
</p> | |
<ul> | |
<li>Safari Version 9.1.1 (11601.6.17)</li> | |
<li>Safari Preview Version 9.1.2 (11601.7.4, 11602.1.37)</li> | |
</ul> | |
<picture> | |
<source type="image/webp" sizes="100vw" srcset="https://leemoody.co.uk/images/content/pandamath-1invites-w800.webp 800w"> | |
<img src="https://leemoody.co.uk/images/content/pandamath-1invites-w800.jpeg" sizes="100vw" srcset="https://leemoody.co.uk/images/content/pandamath-1invites-w800.jpeg 800w" alt=""> | |
</picture> | |
</body> | |
</html> |
Author
notlee
commented
Jul 6, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment