I have the following function:
jQuery(document).ready(function(){
window.addEventListener("load", function (){
alert("hello");
});
It works on the first run, but then stops working when I hit the refresh button.
If I empty the cache or hard reload, it works again once.
What is going on? How can I fix this?