How to alter the Browser's Refresh Event and trigger a custom function?

Posted by Starx on Stack Overflow See other posts from Stack Overflow or by Starx
Published on 2010-06-08T01:35:10Z Indexed on 2010/06/08 1:42 UTC
Read the original article Hit count: 235

Filed under:
|

As you all know, when we hit the refresh button, the entire page starts to reload. But I dont that, I only want to refresh some portions, which need to be refresh in case of a need.

I know, I can use ajax to reload a piece of content. But I want to attach this ajax function while the user clicks the refresh button or presses F5 or presses Ctrl+F5.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery