How to lazyload a iframe with caching in mind
问题 I used this method before. <iframe data-src="https://youtube.com/...?autoplay=1"></iframe> On event with javascript I turned the data-src to src and the video started to play. I had browser caching problems with that, videos autoplaying in background (I load a thumbnail in place for the actual iframe) when going back in the browser. Because of that I switched to a method where I just load the iframe inside a comment <!--<iframe src="https://youtube.com/...?autoplay=1"></iframe>--> and then