I have some insight for this thread: when your page is gone from the browser's memory, so is the JavaScript code. Your ajax request might be fired just fine onUnload, but by the time the ajax returns a response, your original JS code is no longer there to handle it because the browser has loaded the new page.
With a hyperlink, the browser has to make some kind of HTTP request (even if it's just a HEAD request to see if the page has been modified or if the browser can use its cached copy of the new page, if it has one). This adds a tiny delay and gives your ajax request some time to finish and return and get picked up by the JavaScript. When you hit the back button though, most browsers will automatically go straight to cache and not make any HTTP request whatsoever (which is why it's nearly impossible to detect when a back button has been used, for example with an online RPG game). So the ajax request is sent but instantaneously the page is cleared from browser memory, and if the ajax request completes there's no handler for it.
Similarly, this instantaneous erasion of memory might actually
cancel the ajax request, too, before the browser even opens a socket with the server to deliver the request. If your server isn't even being hit with the request at all, this is likely what's happening.
You might want to open your database page in a window that doesn't have navigation buttons.
-------------
Cuvou.com | My personal homepage
Code:
perl -e '$|=$i=1;print" oo\n<|>\n_|_";x:sleep$|;print"\b",$i++%2?"/":"_";goto x;'