If the user cancels, then the TCP connection will be closed by the user's browser which your code can then detect. Probably the easiest thing is just to check whether your print (or syswrite or whatever you are using to deliver the data) fails and terminate that request when that happens (and probably log the failure along with $! in case you end up getting failures that aren't due to user cancels).
-
tye
(but my friends call me "Tye")
|