Open iturgeon opened 6 years ago
Adding some ideas from a duplicate issue here:
Agree - my thoughts were to add a randomly chosen directory into the widget url - perhaps id-widget/player.html -> id-widget/dk20#K/player.html If we know what version the widget is - we could use that instead id-widget/player.html -> id-widget/v2.0.1/player.html
another idea was introduced over on #1169 where this would be implemented in the MDK - causing the mdk to add the widget version or cache-busting info to the .wigt file output.
When widgets get installed now, they just overwrite the old files in place.
We should install them into a new directory for 2 purposes: keeping a short history (and supporting people currently playing an older version), and (the primary reason for this issue) busting CDN cache when a new version is deployed.
So, installing a widget would create a new directory close to what it does now: From
$static/widget/4-crossword
to$static/widget/4-crossword-fx3k29
The play iframe would then point to something like
$static/widget/4-crossword-fx3k29/player.html