How to fix bug with unbeforeunload in Chrome?
I have the follow code:

    window.onbeforeunload = function() {
 
 	
 	     	      $.post(
                       'script/ratings.php', 
                        {
                        data: dataToServer,
                        slider: slider_position_value,
                        article: ARTICLE_NAME
                        },
                          function(data) {
                              
                       });
 	     
     };   

that works perfectly in IE and Mozilla. Of oourse, I know about the bug in Chrome due to this event doesn't appear. I need recipe to catch this event and make POST-request into it.
Thanks.
How to fix bug with unbeforeunload in Chrome?
===

I have the follow code:

    window.onbeforeunload = function() {
 
 	
 	     	      $.post(
                       'script/ratings.php', 
                        {
                        data: dataToServer,
                        slider: slider_position_value,
                        article: ARTICLE_NAME
                        },
                          function(data) {
                              
                       });
 	     
     };   

that works perfectly in IE and Mozilla. Of oourse, I know about the bug in Chrome due to this event doesn't appear. I need recipe to catch this event and make POST-request into it.
Thanks.