vvo / lazyload

:bullettrain_front: Lazyload images, iframes, widgets with a standalone JavaScript lazyloader
https://vvo.github.io/lazyload/
MIT License
938 stars 158 forks source link

lazyloading iframes breaks browser back on firefox #63

Closed dwands closed 9 years ago

dwands commented 10 years ago

Hi

Setting the src attribute on an iframe seems to add it to the browser history in firefox, here's a discussion I found about it:

http://stackoverflow.com/questions/2245883/browser-back-acts-on-nested-iframe-before-the-page-itself-is-there-a-way-to-av

The solution seems to be to replace the iframes's contentWindow.location instead of setting src.

Thanks,

Dave

vvo commented 9 years ago

@dwands will accept PR for this.

vvo commented 9 years ago

@dwands also if this is a bug of firefox only please can you find a reference link? Do not want to fix browser bugs that will be fixed soon.