DMarby / picsum-photos

Lorem Ipsum... but for photos.
https://picsum.photos
MIT License
2.2k stars 152 forks source link

Adding TAO headers to expose timing resource info #90

Closed marcelduran closed 1 year ago

marcelduran commented 2 years ago

This PR adds Timing-Allow-Origin (TAO) header to images. This allows any origin to read resource timing values from the images. e.g.:

performance.getEntriesByType('resource').filter(e => e.name.includes('picsum'))[0].transferSize // should be > 0
DMarby commented 1 year ago

Hi @marcelduran,

Thank you for your contribution, sorry about the delay on getting this merged! This will be deployed shortly, but it may take a while until the header is present on all images, as the CDN cache will need to expire first, which generally takes around a month.