File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -231,7 +231,8 @@ export default function IdealImage(
231231 const startTime = performance . now ( ) ;
232232
233233 try {
234- const response = await fetch ( url , { signal, cache : "force-cache" } ) ;
234+ const response = await fetch ( url , { cache : "no-store" } ) ;
235+ await response . blob ( ) ; // Ensures full download
235236 const endTime = performance . now ( ) ;
236237 const duration = ( endTime - startTime ) / 1000 ;
237238
@@ -241,7 +242,7 @@ export default function IdealImage(
241242 console . log ( "Took too long, setting as 3g" ) ;
242243 setNetworkType ( "3g" ) ;
243244 } else {
244- console . log ( " Loaded quickly, setting as 4g" ) ;
245+ console . log ( ` Loaded ${ url } quickly in ${ duration } , setting as 4g` ) ;
245246 setNetworkType ( "4g" ) ;
246247 }
247248 } catch ( error ) {
You can’t perform that action at this time.
0 commit comments