This is just a small tip for the Javascript developers out there. Sometimes you may want to quickly detect when the bottom of a page has been reached. A handy way to do this when using jQuery is to check the following condition:
$(window).scrollTop() + $(window).height() == $(document).height()