I don't know if someone has already come up with a swiss-knife solution to the problem, but I want to discuss a possible one with you.
Suppose that you are on a "New Post" type page and have to do with a user having a very slow connection (keep in mind, this could also apply to a large upload from a user having a fast connection).
A way to tackle this problem (and that's rather trivial to implement) could be to regularly (maybe transparently) save his post's actual state in his browser (eg. LocalStorage) and on submit send it chunkified to the server.
What changes is that as he presses submit he would be immediately redirected to the pseudo-post page (loaded from his browser) like his post was really sent, but nobody else will actually see it till it is.
In the background, the server keeps in sync with the browser and gets the missing chunks from it. If the client disconnects the operation will continue as soon as it reconnects.
Is this good from a UX point (I think that Firefox still shows that ugly warning when you want to save something on the LocalStorage) or it's better to stick with a loader?
Otherwise, what's your solution?