Spaces:
Running
Running
Commit
·
8b3b62a
1
Parent(s):
52c147a
Update templates/index.html
Browse files- templates/index.html +4 -2
templates/index.html
CHANGED
@@ -300,13 +300,15 @@
|
|
300 |
|
301 |
async function refreshImage() {
|
302 |
const timestamp = new Date().getTime();
|
303 |
-
const fetchUrl = `${newUrl}?t=${timestamp}`;
|
|
|
304 |
|
305 |
try {
|
306 |
const response = await fetch(fetchUrl, { method: 'HEAD' });
|
307 |
|
308 |
if (response.ok && response.headers.get('Content-Type') === 'image/jpeg') {
|
309 |
-
img.src = `${newUrl}&t=${timestamp}`;
|
|
|
310 |
}
|
311 |
} catch (error) {
|
312 |
console.error('Fetch failed:', error);
|
|
|
300 |
|
301 |
async function refreshImage() {
|
302 |
const timestamp = new Date().getTime();
|
303 |
+
//const fetchUrl = `${newUrl}?t=${timestamp}`;
|
304 |
+
const fetchUrl = newUrl;
|
305 |
|
306 |
try {
|
307 |
const response = await fetch(fetchUrl, { method: 'HEAD' });
|
308 |
|
309 |
if (response.ok && response.headers.get('Content-Type') === 'image/jpeg') {
|
310 |
+
//img.src = `${newUrl}&t=${timestamp}`;
|
311 |
+
img.src = newUrl;
|
312 |
}
|
313 |
} catch (error) {
|
314 |
console.error('Fetch failed:', error);
|