Posted by: glasskeys | 05/09/2011

How to quickly scroll to the bottom of a web page on the iPad.

(To view a larger image with a more detailed description tap or click a thumbnail.)

In the recent past on glasskeys.com I posted a tip on how to quickly scroll to the top of pages in Safari, but as the weeks have gone by I kept seeing ever more searches by readers on how to quickly scroll to the bottom of web pages. After a bit of experimentation, I found a way that uses Safari’s built-in ability to run javascript as a bookmark to accomplish this.

If you wish to add this functionality open Safari and browse to your favourite web page, I chose http://www.google.com because it loads quickly and will be easy to replace shortly with a short javascript snippet. Tap the button to the left of the white URL field that contains http://www.google.com – and tap the Add Bookmark button. In the top field type <Scroll to Bottom>, then make sure that at the very bottom of this window Bookmarks Bar is selected. If this displays Bookmarks, tap it and in the next menu select the Bookmarks Bar folder. Navigate back to Bookmarks and tap the blue Save button.

You will now see <Scroll to Bottom> on the bookmark bar in Safari and if it is selected it will take you to Google. At this point we need to replace the http://www.google.com address with Javascript that makes Safari scroll to the bottom of web pages.

For those curious, the javascript that will be used is the following:
javascript:window.scrollTo(0,document.body.scrollHeight);

Because this needs URL encoded to run properly, it changes to this:
javascript:window.scrollTo%280%2Cdocument.body.scrollHeight%29%3b%0a

To paste our Javascript source tap the bookmarks button (the “open book” icon). Then tap first the Edit button and secondly the <Scroll to Bottom> bookmark entry. Copy the “iPad friendly” and easy to select text from the rectangle below and paste this into the field that currently contains http://www.google.com. You need to completely erase all text before pasting or the script will not work properly.

Tap the Done key on the keyboard. You may now enter a website at top to test your new “scroll to bottom” button. See the screenshots above for examples of this. Incidentally — this tip also works with the Atomic Web browser as the last two screenshots illustrate.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
UPDATE (15 May 2011): You may wish to ensure that your Bookmarks Bar is always visible whilst using this tip.


Responses

  1. Perfect, thanks very much

  2. Perfect, thanks very much

  3. So useful, thanks.

  4. Very nice, thanks for sharing!!!


Leave a comment

Categories