diff --git a/server/src/server.ts b/server/src/server.ts index bc75143..d4bd9e5 100644 --- a/server/src/server.ts +++ b/server/src/server.ts @@ -29,6 +29,14 @@ app.get('/ipad.png', async (req, res) => { }); const screenshot = await puppet_page.screenshot(); await puppet_page.close(); + + // Disable caching + res.setHeader( + 'Cache-Control', + 'no-store, no-cache, must-revalidate, proxy-revalidate' + ); + res.setHeader('Expires', '0'); + res.send(screenshot); }); diff --git a/src/ipad.ts b/src/ipad.ts index 26db887..ebb010a 100644 --- a/src/ipad.ts +++ b/src/ipad.ts @@ -46,6 +46,7 @@ function refresh() { 'viewport', `${window.innerWidth}x${window.innerHeight}x${window.devicePixelRatio}` ); + url.hash = String(new Date().getTime()); const urlParams = new URLSearchParams(window.location.search); if (urlParams.has('tool')) {