I have a partial solution for a variety of on-line annoyances, but I think many users will not like it.
This vastly reduces (but does not completely eliminate) a whole lot of excess activity in many web pages I view, yet only occasionally reduces any functionality that I actually care about.
Sometimes, when I have JS enabled and many pages open in many tabs, there will be so much JS running that my whole machine bogs down. Offing JS puts a stop to that too.
This doesn’t directly address the OP (which I sometimes have trouble with too), but it certainly does reduce a lot of shitty annoyances, and I think that may sometimes entail fewer re-flows as well.
Note also: If you right-click on an most images, you get an option to block all future images from that same web site. (At least, in Firefox you do.) I have blocked a whole lot of ads that way, at least when they come from third-party places, and this has made a great improvement in my browsing experience too.