File tree Expand file tree Collapse file tree 2 files changed +18
-17
lines changed
Expand file tree Collapse file tree 2 files changed +18
-17
lines changed Original file line number Diff line number Diff line change 3232
3333 < link rel ="icon " href ="https://securing.guide/favicon.ico ">
3434 < link rel ="apple-touch-icon " href ="https://securing.guide/favicon.ico ">
35- < link rel ="prerender " href ="https://securing.guide/discord ">
36- < link rel ="prerender " href ="https://securing.guide/minecraft ">
37- < link rel ="prerender " href ="https://securing.guide/steam ">
38- < link rel ="prerender " href ="https://securing.guide/twitter ">
39- < link rel ="prerender " href ="https://securing.guide/playstation ">
40-
35+ < link rel ="prefetch " href ="https://securing.guide/js/generate.js " as ="script ">
36+ < link rel ="prefetch " href ="https://securing.guide/guides/discord.js " as ="script ">
37+ < link rel ="prefetch " href ="https://securing.guide/guides/minecraft.js " as ="script ">
38+ < link rel ="prefetch " href ="https://securing.guide/guides/steam.js " as ="script ">
39+ < link rel ="prefetch " href ="https://securing.guide/guides/tiktok.js " as ="script ">
40+ < link rel ="prefetch " href ="https://securing.guide/guides/twitch.js " as ="script ">
41+ < link rel ="prefetch " href ="https://securing.guide/guides/epic.js " as ="script ">
42+ < link rel ="prefetch " href ="https://securing.guide/guides/snapchat.js " as ="script ">
43+ < link rel ="prefetch " href ="https://securing.guide/guides/kick.js " as ="script ">
44+ < link rel ="prefetch " href ="https://securing.guide/guides/twitter.js " as ="script ">
45+ < link rel ="prefetch " href ="https://securing.guide/guides/valorant.js " as ="script ">
46+ < link rel ="prefetch " href ="https://securing.guide/guides/instagram.js " as ="script ">
47+ < link rel ="prefetch " href ="https://securing.guide/guides/playstation.js " as ="script ">
48+ < link rel ="prefetch " href ="https://securing.guide/guides/steam.js " as ="script ">
4149 < script > window . addEventListener ( "load" , ( ) => document . body . classList . remove ( "preload" ) ) </ script >
4250</ head >
4351< body class ="preload ">
Original file line number Diff line number Diff line change @@ -56,16 +56,9 @@ self.addEventListener('activate', (event) => {
5656} ) ;
5757
5858self . addEventListener ( 'fetch' , ( event ) => {
59- const req = event . request ;
60-
61- // Skip prerender or special-purpose requests
62- if ( req . headers . get ( 'Purpose' ) === 'prerender' ) {
63- return event . respondWith ( fetch ( req ) ) ;
64- }
65-
6659 // Always try the network first
6760 event . respondWith (
68- fetch ( req )
61+ fetch ( event . request )
6962 . then ( ( networkResponse ) => {
7063 const cloned = networkResponse . clone ( ) ;
7164
@@ -76,17 +69,17 @@ self.addEventListener('fetch', (event) => {
7669 networkResponse . status === 200
7770 ) {
7871 caches . open ( CACHE_NAME ) . then ( ( cache ) => {
79- cache . put ( req , cloned ) ;
72+ cache . put ( event . request , cloned ) ;
8073 } ) ;
8174 }
8275
8376 return networkResponse ;
8477 } )
8578 . catch ( ( ) => {
8679 // If network fails, use cache
87- return caches . match ( req ) . then ( ( cachedResponse ) => {
80+ return caches . match ( event . request ) . then ( ( cachedResponse ) => {
8881 // For navigation fallback
89- if ( ! cachedResponse && req . mode === 'navigate' ) {
82+ if ( ! cachedResponse && event . request . mode === 'navigate' ) {
9083 return caches . match ( '/' ) ;
9184 }
9285 return cachedResponse ;
You can’t perform that action at this time.
0 commit comments