Tim O'Neill says that, in the Middle Ages at least, people didn't much, because there were onerous fines against it, as people thought at least the odor had something to do with illness.
However, from the Telegraph, covering a BBC Two history series called Filthy Cities (which can be seen online):
In medieval London, there were no pavements - people had to walk on the bare earth. Except, unfortunately, it wasn't bare earth - the ground was covered with the excrement of both people and animals, as well as animal entrails and rotting food...
Eventually, many streets became impassable, so muck-rakers were hired to clean them as best they could. Though the job was abhorrent, the muck-rakers were paid much better than the average working man.
Could fines against window-emptying matter when the streets below were basically paved with the stuff? Streets like
Shiteburne Sherburne and foul brooks were colorfully named for the filth.
Christine A. Powell's essay “A Matter of Convenience” says that from 1550-1750 (the insanitary centuries) in England and Scotland, the practice of emptying waste out windows, and leaving it everywhere else besides, was ubiquitous enough to gross out the court of Charles the Second while summering in Oxford.
So, illegal but lightly enforced? Illegal but ignored? Finally, here's a legal mystery we don't care if we ever get to the bottom of—yuck.