Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Safari greater 9 (desktop and mobile) downloads the external svg file for every icon on page #110
This may be a safari bug, but maybe you can dig into this better than me…
In this testcase http://phpscripts.zeit.de/svg-use-testcase/ you can see the problem, by loading and examining it with Chrome and a Safari greater 9 (exact version mentioned on the testcase). The problem is also seen in iOs safari, since 9.2 i guess (inspected with Charles proxy).
For every combination of the code
<svg class="svg-symbol" role="img" aria-labelledby="title"> <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="icons.svg#svg-search"></use> </svg>
the svg file
This leads to extreme high content downloads, which is especially on mobile and may not a good development for svg for everybody, I guess. :(
referenced this issue
Apr 7, 2016
This was fixed in Safari 9.1.1/IOS 9.3.2. See: https://www.smashingmagazine.com/2016/05/safari-svg-sprite-bug/
Tested it with my projects and can confirm.