Spaces:
Sleeping
Sleeping
LogicalTrue commited on
Commit 路
90ec839
1
Parent(s): 1ffa897
Implement cache busting query parameters on all redirects to viewer.html to prevent stale cached mobile view
Browse files- frontend/app.js +2 -2
- frontend/index.html +1 -1
frontend/app.js
CHANGED
|
@@ -2877,7 +2877,7 @@ if (viewOnMobileBtn) {
|
|
| 2877 |
|
| 2878 |
// Resolve absolute GLTF URL
|
| 2879 |
const absoluteModelUrl = activeGltfUrl.startsWith('http') ? activeGltfUrl : `${window.location.origin}${activeGltfUrl}`;
|
| 2880 |
-
const viewerUrl = `${window.location.origin}/viewer.html?model=${encodeURIComponent(absoluteModelUrl)}`;
|
| 2881 |
|
| 2882 |
// Generate QR code image url using public API
|
| 2883 |
const qrApiUrl = `https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(viewerUrl)}`;
|
|
@@ -3965,7 +3965,7 @@ function checkMobileRedirect() {
|
|
| 3965 |
La creaci贸n, edici贸n y limpieza de mallas est谩 dise帽ada para pantallas de PC/Laptops. En celulares, te recomendamos usar el visor 3D t谩ctil optimizado y proyectar en Realidad Aumentada (AR).
|
| 3966 |
</p>
|
| 3967 |
<div style="display: flex; flex-direction: column; gap: 12px; width: 100%;">
|
| 3968 |
-
<a href="/viewer.html" style="background: #7c3aed; color: #ffffff; padding: 14px; border-radius: 10px; text-decoration: none; font-weight: 700; font-size: 0.95rem; display: block; box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);">
|
| 3969 |
Abrir Visor M贸vil (AR)
|
| 3970 |
</a>
|
| 3971 |
<button id="btnStayOnPCWeb" style="background: transparent; border: 1px solid rgba(255,255,255,0.15); color: #a1a1aa; padding: 12px; border-radius: 10px; font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: all 0.2s;">
|
|
|
|
| 2877 |
|
| 2878 |
// Resolve absolute GLTF URL
|
| 2879 |
const absoluteModelUrl = activeGltfUrl.startsWith('http') ? activeGltfUrl : `${window.location.origin}${activeGltfUrl}`;
|
| 2880 |
+
const viewerUrl = `${window.location.origin}/viewer.html?v=119&model=${encodeURIComponent(absoluteModelUrl)}`;
|
| 2881 |
|
| 2882 |
// Generate QR code image url using public API
|
| 2883 |
const qrApiUrl = `https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(viewerUrl)}`;
|
|
|
|
| 3965 |
La creaci贸n, edici贸n y limpieza de mallas est谩 dise帽ada para pantallas de PC/Laptops. En celulares, te recomendamos usar el visor 3D t谩ctil optimizado y proyectar en Realidad Aumentada (AR).
|
| 3966 |
</p>
|
| 3967 |
<div style="display: flex; flex-direction: column; gap: 12px; width: 100%;">
|
| 3968 |
+
<a href="/viewer.html?v=119" style="background: #7c3aed; color: #ffffff; padding: 14px; border-radius: 10px; text-decoration: none; font-weight: 700; font-size: 0.95rem; display: block; box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);">
|
| 3969 |
Abrir Visor M贸vil (AR)
|
| 3970 |
</a>
|
| 3971 |
<button id="btnStayOnPCWeb" style="background: transparent; border: 1px solid rgba(255,255,255,0.15); color: #a1a1aa; padding: 12px; border-radius: 10px; font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: all 0.2s;">
|
frontend/index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
| 8 |
<!-- Immediate Mobile Redirect -->
|
| 9 |
<script>
|
| 10 |
if (window.innerWidth < 768 && sessionStorage.getItem('forceDesktop') !== 'true') {
|
| 11 |
-
window.location.href = '/viewer.html';
|
| 12 |
}
|
| 13 |
</script>
|
| 14 |
|
|
|
|
| 8 |
<!-- Immediate Mobile Redirect -->
|
| 9 |
<script>
|
| 10 |
if (window.innerWidth < 768 && sessionStorage.getItem('forceDesktop') !== 'true') {
|
| 11 |
+
window.location.href = '/viewer.html?v=119';
|
| 12 |
}
|
| 13 |
</script>
|
| 14 |
|