I use svg sprites on the site. There are a lot of icons (about 100), and there are no problems with displaying 99% of the icons. But some are not loaded, or are loaded on one page, but not on the other.
The console displays an error 500 (Internal Server Error) (just to load the sprite).
Any suggestions what this may be related to?
I will give an example of the construction of the svg sprite:
<svg width="0" height="0" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <symbol id="icon-apple" viewBox="0 0 56 64"> ... </symbol> </defs> </svg> I put in html by ID:
<svg class="svg-icons"> <use xlink:href="images/svgdefs.svg#icon-apple"></use> </svg> Non-loadable icon code (generated via icomoon.io):
<symbol id="icon-education" viewBox="0 0 40 40"> <path d="M6.66 16l13.34 8 20-12-20-12-20 12h20v4h-13.34zM0 16v16l4-4.44v-9.16l-4-2.4zM20 40l-14-8.4v-12l14 8.4 14-8.4v12l-14 8.4z"></path> </symbol>
FFthen the reflection of icons in Chrome is the result of new technologies that only confuse developers and do not provide cross-browser compatibility. Third, add the sprite svg file first, and then call icons from it using the command<use>- Alexandr_TTowl-carousel-2, add them via navText. - Igor