5 years later...
The only browser I have this problem with, is Chrome; I don't have Safari.
The pattern I noticed is that it works when I inline the code:
<script type="text/javascript">
$(window).resize(function(e) { console.log("resize inline", +new Date()) });
</script>
but not when I put it in a separate Javascript file that I load with:
<script type="text/javascript" src="/js/resized.js"></script>
where the script contains
console.log('script loaded');
$(window).resize(function(e) { console.log("resize in script file", +new Date()) });
I can only guess this is some kind of "protection" built in by the Chrome development team, but it is silly and annoying. At least they could have let me bypass this using some "same domain policy".
Update for a while I thought using $(document).ready()
fixed it, but apparently I was wrong.