I have a site in which there are 2 states: unpublished and published.
When in the published state, images are served from my CDN with caching set for a month. Once published, no changes are allowed to the file so I'm never worried about it.
However, when in the unpublished state, I want to force the page to refresh every time it is viewed. User makes an update, previews their content to see the new file which has been hard refreshed to see the most recent updates.
How can I force a hard refresh based on whether or not the page is in a published or unpublished state?