It’s interesting, maybe you know what can happen here. I am using a featherweight plugin to display youtube videos in an iframe.
But if you close the lightbox before downloading the sw.js. file He then opens the sw.js file in a separate inspector window. I added 3 screenshots to further explain the problem.
st screenshot - this is the network when calling the embedded video from YouTube. As you can see, the sw.js file is uploaded. If you close it, then it works great.
The 2nd screenshot is the network when you call the embedded video from YouTube. You can see that the sw.js file is not loaded. When you close the lightbox before downloading it, the sw.js file opens in a separate inspector window, see Screenshot 3.
3rd screenshot - you can see that the inspector opened the sw.js file, which opened in a new inspector window.
I should also add that when calling a new featherweight, I use the root option to change the lightbox root and the beforeOpen option to close the previous featherweight with "$ .featherlight.close ();".



Featherlight Link Link
source
share