seiyable / vue-simple-svg

A simple Vue.js plugin that allows you to load a SVG image as an inline SVG with an access to change its fill colors
MIT License
80 stars 23 forks source link

Cache requests to equals SVGs #6

Open shrpne opened 6 years ago

shrpne commented 6 years ago

When the component is used multiple times, it will generate multiple requests to the same file. So it's better to implement some cache.

Here are some examples how it's done in other implementations: https://github.com/uikit/uikit/blob/develop/src/js/core/svg.js https://medium.com/@jackysee/simple-loading-svg-inline-in-vue-35994f5326f2