ipad: Avoid caching of generated image
This commit is contained in:
parent
c99ad19bba
commit
c1e05a5605
@ -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);
|
||||
});
|
||||
|
||||
|
@ -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')) {
|
||||
|
Loading…
Reference in New Issue
Block a user