Reputation: 23
Error statement in console
The service worker navigation preload request was cancelled before 'preloadResponse' settled. If you intend to use 'preloadResponse', use waitUntil() or respondWith() to wait for the promise to settle.
Where exactly should I put it and how should I do it? Is there any simple and good solution?
I am setting up a simple site with vuetify in vue. I am using jquery and css to adjust it. For your reference, I will put the functions I am using below.
<v-col class="youtube_col" xs="12">
<iframe class="youtube" src="https://www.youtube.com/embed/tpk0PxK-c5E"
title="YouTube video player" frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen></iframe>
</v-col>
Upvotes: 0
Views: 252
Reputation: 794
You could try using the waitUntil() method on the event.preloadResponse promise:
event.waitUntil(event.preloadResponse.then(function(response) {
// do something with the response
}));
Upvotes: 2