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();
|
const screenshot = await puppet_page.screenshot();
|
||||||
await puppet_page.close();
|
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);
|
res.send(screenshot);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -46,6 +46,7 @@ function refresh() {
|
|||||||
'viewport',
|
'viewport',
|
||||||
`${window.innerWidth}x${window.innerHeight}x${window.devicePixelRatio}`
|
`${window.innerWidth}x${window.innerHeight}x${window.devicePixelRatio}`
|
||||||
);
|
);
|
||||||
|
url.hash = String(new Date().getTime());
|
||||||
|
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
if (urlParams.has('tool')) {
|
if (urlParams.has('tool')) {
|
||||||
|
Loading…
Reference in New Issue
Block a user