Bug Tracker

Ticket #10509 (closed bug: cantfix)

Opened 4 years ago

Last modified 3 years ago


Reported by: bistra Owned by:
Priority: low Milestone: None
Component: event Version: 1.6.4
Keywords: Cc:
Blocking: Blocked by:


JQUERY UNLOAD DOESN'T WORK IN GOOGLE CHROME 14 AND ABOVE! For example this: $(window).unload(function(){



doesn't produces anything! It crashes totally my project! Help me, please!

Change History

comment:1 Changed 4 years ago by addyosmani

  • Priority changed from undecided to low
  • Status changed from new to open
  • Component changed from unfiled to event

Confirmed that this works in FF.latest but not in Chrome 14+:  http://jsfiddle.net/BT3SS/1/. Pretty sure this is a dupe of another ticket, but will chase down and confirm. I do know there are known issues with onbeforeunload in Chrome.stable onwards, but need to find out if there are related ones with this.

comment:2 Changed 4 years ago by dmethvin

  • Status changed from open to closed
  • Resolution set to cantfix

Not our bug, and something we can't patch.


Several dups in their bug database, search for "onunload" to see them.

Could be related to this security fix since it arose at Chrome 14:


comment:3 Changed 3 years ago by anonymous

It has a solution:

window.onbeforeunload = function() { return "text"; }

It's not a jQuery code, but it works.

comment:4 Changed 3 years ago by anonymous

The solution mentioned above:

window.onbeforeunload = function() { return "text"; }

does not work either for me if I close the respective window. It works if I reload the page.

Note: See TracTickets for help on using tickets.