About

Sunday 15 July 2012

Open Web Pages in Google Chrome for iOS [Bookmarklet]

Use the Open in Chrome bookmarklet to quickly send web pages from Safari to the Chrome browser on your iPad or iPhone.

The Google Chrome browser is now available for your iPhone and iPad but unfortunately, you do not have the option to set Chrome as your default web browser on the iOS device. Thus, if you have happen to click a link in an email message, the corresponding web page will always open in the mobile Safari browser and you cannot override this default setting.
If you would however like to send a web page, that is open inside Safari, to the Chrome Browser, there is an easy way.
Tap the address bar in Safari browser, navigate to the beginning of the URL and replace the location protocol http with googlechrome. Then tap “Go” and the web page will automatically open inside the Google Chrome app.
Open in Google Chrome
Chrome for iOS supports googlechrome (for http) and googlechromes (for https) URI schemes that app developers may use to determine whether Chrome is available on the iOS device or not. More technical details are available at dev.google.com via John Gruber.

Open in Chrome – The Bookmarklet

There’s an easier workaround as well. You can install the “Open in Chrome” bookmarklet in mobile Safari and you will then be able to send any web page from the Safari browser to the Chrome app with a single tap. Here’s how:
Step 1. Open this page on your iPhone /iPad and add it to your Safari bookmarks.
Step 2: Select and copy the following JavaScript code to your iOS clipboard.
javascript:(function(){if(document.location.href.indexOf('http')===0)document.location.href=document.location.href.replace(/^http/,'googlechrome');})();
Step 3. Open the bookmarks menu in Safari and tap the “Edit” button. Next tap the Web Page that you have added in step 1.
Step 4. Tap the URL field on the Edit Bookmarks screen, erase everything and paste the JavaScript code from the clipboard.
That’s it. Now you can easily switch from Safari to Chrome with a single tap. See demo:

No comments:

Post a Comment