Data-URI's and caching

前端 未结 1 2008
失恋的感觉
失恋的感觉 2020-12-31 04:39

I read this on Wikipedia:

Data URIs are not separately cached from their containing documents (e.g. CSS or HTML files) so data is downloaded every tim

相关标签:
1条回答
  • 2020-12-31 05:41

    Data URIs are nothing more than text in the form of Base64-encoded binary data, that's embedded within your HTML and CSS files. So yes, they will be downloaded as part of your HTML and CSS files every time they're requested, unless those files are themselves cached.

    If you keep your data URIs to just your stylesheets and send proper cache headers, caching your data: images together with your CSS shouldn't pose issues.

    0 讨论(0)
提交回复
热议问题