I am not new to Django (1y work experience) but I have got a strange task that I cannot deal with. So I have to write to write Middleware that will be counting requests, but only those that were not aborted by client (the ones that got fully rendered in browser).
I found out that when client aborts connection, server (Python) throws errno 32 Broken Pipe as it comes from unsuccessful write to socket [I think that connection server-client is TCP there so it is nothing strange].
But the problem is that I cannot find a way to check if browser fully rendered page or to check if that error occurred (of course that error can have another origin but it would be a good start).
Ohhh and I don't want to use JS (with JS it is a piece of cake) but I can use HTML5 (if it can help...)