非同期通信中のキャンセルについて(つづき)

いきなり続き。
考えてみると、ブラウザのキャンセルボタンでできるかもしれない(できないかもしれない)。よくわかんないけど。でもまあ、もうちょっと突っ込んでみた。

If you are concerned about possible timeouts of your server process, you can modify the loadXMLDoc() function to save a global time-stamp of the send() method, and then modify the event handler function to calculate the elapsed time with each firing of the event. If the time exceeds an acceptable limit, then invoke the req.abort() method to cancel the send operation, and alert the user about the failure.
Safari - Apple Developer

て書いてあって、通信の進捗を計算して時間がかかり過ぎるようだったらabortする、みたいな。
で、重い通信と言えばファイルアップロードくらいしか思いつかなかったんだけど、そのものズバリのものが
XMLHttpRequest でファイルのアップロードができないか? - naoyaのはてなダイアリー
あった。
このコメント欄をたどってここ。
http://sean.treadway.info/articles/2005/06/22/upload-progress-stabilizing
ファイルアップロードの進捗を表示する。
キャンセルしたければボタンを一個つけて、クリックしたらabortなのでしょうか。