""" email = request.form.get('email') password = request.form.get('password') if password: return redirect(url_for('Handler.Handler_Main')) else: return "Failed """" template_folder='OnlineMain/P_Web_App/FileHandler/templates', static_folder='static' "../../static/css/login.css" #resp=json.dumps(data) #data=data.replace("\'", "\"") #data=json.dumps(data) , { "src": "/icon-256x256.png", "sizes": "256x256", "type": "image/png" }, { "src": "/icon-384x384.png", "sizes": "384x384", "type": "image/png" }, { "src": "/icon-512x512.png", "sizes": "512x512", "type": "image/png" } "css/cover.css" self.addEventListener("fetch", (event) => { console.log("Service Worker : fetch!") event.respondWith( // we are sending the request to the server. if network is down, then sending the res // from the cache. fetch(event.request) .catch(() => { caches.match(event.request) }) ) }) self.addEventListener('fetch', (e) => { console.log('[ServiceWorker] Fetch', e.request.url); e.respondWith((async () => { const r = await caches.match(e.request); console.log(`[Service Worker] Fetching resource: ${e.request.url}`); if (r) { return r; } try { const response = await fetch(e.request); // We could cache this new resource if we wanted to. // const cache = await caches.open(cacheName); // console.log(`[Service Worker] Caching new resource: ${e.request.url}`); // cache.put(e.request, response.clone()); return response; } catch(error) { console.log('Fetch failed; returning offline page instead.', error); // In reality you'd have many different // fallbacks, depending on URL & headers. // Eg, a fallback silhouette image for avatars. let url = e.request.url; let extension = url.split('.').pop(); console.log('URL: ', url); if (extension === 'jpg' || extension === 'png') { const FALLBACK_IMAGE = ``; // const FALLBACK_IMAGE = ``; return Promise.resolve(new Response(FALLBACK_IMAGE, { headers: { 'Content-Type': 'image/svg+xml' } })); } const cache = await caches.open(cacheName); const cachedResponse = await cache.match('offline.html'); return cachedResponse; } })()); }); Footer '../../static/android-chrome-192x192.png', '../../static/android-chrome-512x512.png', '../../static/apple-touch-icon.png', '../../static/favicon-16x16.png', '../../static/favicon-32x32.png', '../../static/favicon.ico', '../../static/css/style.css', '../../static/css/addedStyle.css', '../../static/javascript/app.js', '../../static/javascript/services.js', '../../static/javascript/script.js', '../../static/javascript/pass-show-hide.js', '../../static/images/img.png', '../../static/images/background-img.jpg', '../../static/images/do-img1.png', '../../static/images/do-img2.png', '../../static/images/do-img3.png', '../../static/images/doc2.png', '../../static/images/doc3.png', '../../static/images/dont-img1.png', '../../static/images/dont-img2.png', '../../static/images/dont-img3.png', '../../static/images/home-bg.jpg', '../../static/images/main-symp-img.png', '../../static/images/main-wash-img.png', '../../static/images/pre-1.png', '../../static/images/pre-2.png', '../../static/images/pre-3.png', '../../static/images/pre-4.png', '../../static/images/pre-5.png', '../../static/images/pre-6.png', '../../static/images/scroll-img.png', '../../static/images/symp-a.png', '../../static/images/symp-b.png', '../../static/images/symp-c.png', '../../static/images/symp-d.png', '../../static/images/symp-e.png', '../../static/images/symp-f.png', '../../static/images/virus.png', '../../static/images/wash-a.png', '../../static/images/wash-b.png', '../../static/images/wash-c.png', '../../static/images/wash-d.png', '../../static/images/wash-e.png', '../../static/images/wash-f.png' self.addEventListener('install', (e) => { console.log('[Service Worker] Install'); e.waitUntil((async () => { const cache = await caches.open(cacheName); console.log('[Service Worker] Caching all: app shell and content'); await cache.addAll(contentToCache); })()); });