handle asset changes in headers #607

Open
opened 2018-09-25 16:40:20 +02:00 by daovist · 1 comment
daovist commented 2018-09-25 16:40:20 +02:00 (Migrated from github.com)

When an asset is updated with a new file, it (sometimes) displays the old image because of browser caching. To fix this I added ?${outpoint} to the end of the sourceUrl so when the outpoint changes after an update it will force the browser to download the new image. This is a temporary fix but ideally this should be handled in the asset's request header.

relevant code

@kauffj

When an asset is updated with a new file, it (sometimes) displays the old image because of browser caching. To fix this I added `?${outpoint}` to the end of the `sourceUrl` so when the outpoint changes after an update it will force the browser to download the new image. This is a temporary fix but ideally this should be handled in the asset's request header. [relevant code](https://github.com/lbryio/spee.ch/blob/28a470722f2a5aa4ed17641b2537dedd7371e358/client/src/containers/AssetDisplay/view.jsx#L47) @kauffj
skhameneh commented 2019-02-19 21:07:29 +01:00 (Migrated from github.com)
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/spee.ch#607
No description provided.