Files
prosappweb/web/index.html
T
Lizandro GuarnizoandClaude Sonnet 4.6 13a99d4d34 fix(cache): disable service worker to prevent stale cache on mobile
Flutter's PWA service worker caches the entire app shell aggressively,
causing users to see old versions even after deploys. Disabling it lets
nginx cache headers take effect. Also unregisters any existing service
worker already installed on user devices.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 14:48:05 -05:00

111 lines
2.9 KiB
HTML

<!DOCTYPE html>
<html lang="es">
<head>
<base href="$FLUTTER_BASE_HREF">
<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
<meta name="description" content="ProsApp - Conecta con los mejores profesionales">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="ProsApp">
<link rel="apple-touch-icon" href="icons/Icon-192.png">
<link rel="icon" type="image/png" href="favicon.png"/>
<title>ProsApp</title>
<link rel="manifest" href="manifest.json">
<script type="text/javascript">
window.flutterWebRenderer = 'html';
</script>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
height: 100%;
background-color: #42A4EF;
}
#splash {
position: fixed;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: linear-gradient(180deg, #42A4EF 0%, #1565C0 100%);
z-index: 9999;
transition: opacity 0.3s ease;
}
#splash .logo-box {
background: white;
border-radius: 16px;
padding: 14px 24px;
margin-bottom: 20px;
}
#splash img {
height: 48px;
display: block;
}
#splash .spinner {
width: 32px;
height: 32px;
border: 3px solid rgba(255,255,255,0.3);
border-top-color: white;
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
#splash.hidden {
opacity: 0;
pointer-events: none;
}
</style>
</head>
<body>
<div id="splash">
<div class="logo-box">
<img src="https://prosapp.co/img/logo_prosapp.png" alt="ProsApp"
onerror="this.style.display='none';this.nextElementSibling.style.display='block'">
<span style="display:none;font-size:22px;font-weight:bold;color:#42A4EF;font-family:sans-serif">ProsApp</span>
</div>
<div class="spinner"></div>
</div>
<script>
window.addEventListener('flutter-first-frame', function () {
var splash = document.getElementById('splash');
if (splash) {
splash.classList.add('hidden');
setTimeout(function () { splash.remove(); }, 350);
}
});
</script>
<script>
// Unregister any previously installed service worker so stale cache is cleared
if ('serviceWorker' in navigator) {
navigator.serviceWorker.getRegistrations().then(function(regs) {
regs.forEach(function(r) { r.unregister(); });
});
}
</script>
<script>
// Force cache busting: append build timestamp so stale JS/CSS is never reused
var _v = new Date().getTime();
var _s = document.createElement('script');
_s.src = 'flutter_bootstrap.js?v=' + _v;
_s.async = true;
document.body.appendChild(_s);
</script>
</body>
</html>