@jaffathecake I would vote for doing nothing by default, and having the other scenarios solved with js. If you need it to do something advanced then bring a bit of javascript code to do that. It's much better than having to do something weird or performance problematic by default with only a complicated way to prevent it.
@gundersen as in, the first option in the article, or something even less?