Skip to content

Comment on 535 ways to reload the page with JavaScript

Comments

Interesting to see so many ways to do it, but what's missing is explanations of pros and cons of the different approaches (though I'm sure there probably aren't many differences). Why not just stick with one then?

I read it as more poking fun at the combination of redundancy in the DOM API combined with redundancy in Javascript.

No real difference, but on an older browser, you might shave a few milliseconds off by using "window.location" instead of just "location", as the latter will need to traverse from local scope up to the global (window) scope.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.