4 ms·
Something I've always wondered about these shields... How do you ensure the platforms where users embed them don't cache the images in their CDNs? Is it just a
by andrenotgiant 5y ago
Something I've always wondered about these shields... How do you ensure the platforms where users embed them don't cache the images in their CDNs?
Is it just a matter of setting headers?
- rlonn 5y agoIf you load http://example.com http://example.com and the HTML there includes an image tag that says '<img src="http://othersite.com/image.jpg http://othersite.com/image.jpg">' it means your browser will connect to othersite.com and ask that site for the image. It will not ask example.com.
- andrenotgiant 5y agoI'm asking about what happens when, for example, you embed a dynamic SVG badge in your GitHub readme. Doesn't GitHub cache every image in their own CDN for security and control purposes?
- deleted 5y ago[deleted]
- rlonn 5y agoYou can't use <object>, <iframe> etc tags to embed pictures in your Github README, so you don't get automatic updates there no matter what (i.e. images would only refresh on page load). I don't know if Github proxies and caches <img> contents, or how long they cache it for but I haven't personally seen any delays when I've updated images used in READMEs. But to repeat: auto-updating will not work for Github-hosted content AFAIK.