Using the window.load event waits until the page is finished loading before running.
This causes an issue where if someone accepts cookies while an asset is still loading, they will be taken to a different page that just says true.
Using the DOMContentLoaded should accomplish what the load event was doing, but in a way that makes it not depend on having fully loaded assets.
Using the
window.load
event waits until the page is finished loading before running. This causes an issue where if someone accepts cookies while an asset is still loading, they will be taken to a different page that just saystrue
.Using the
DOMContentLoaded
should accomplish what theload
event was doing, but in a way that makes it not depend on having fully loaded assets.I believe this also resolves issue #11