How To Open URLs In Google Chrome Instead Of Mobile Safari On iPhone And iPad Without Jailbreaking

The good folks at Google surprised a few people yesterday when they announced the immediate release of Google Chrome for iOS during the second day of proceedings at the annual I/O conference. Google has obviously recognized that Apple’s mobile operating system is in dire need of a worthy competitor, a sentiment that is shared by users as it quickly shot to the top of the download charts on release day.

Although Chrome has notched up some extremely positive reviews from users who are using it, it does suffer from the obvious shortcomings of iOS. The operating system on the iPhone, iPod touch and iPad offers no official way of changing the default browser, meaning that any link which automatically invokes the browser will open up Mobile Safari no matter what happens. Jailbroken users have already discovered that they can use Ryan Petrich’s Browser Chooser tweak to set Chrome as the default browsing app, but stock users don’t have this luxury, yet.

Although there isn’t a seamless way of getting around this, a developer named Jon Abrams has published a little bit of JavaScript goodness which, when saved as a Safari bookmark, will allow any webpage in Mobile Safari to be passed directly on to Google Chrome. Follow the simple steps given below on the iOS device in question to get this up and running.

Step 1: Make sure the JavaScript code string at the end of this step is copied to the device’s clipboard: javascript:location.href="googlechrome"+location.href.substring(4);

Step 2: Open up Mobile Safari on your iOS device and navigate to any webpage. Click the action button located in the middle of the toolbar in Safari and save the current page as a bookmark, and give it the name ‘Open Chrome‘.

Step 3: Select the bookmarks page in Mobile Safari and tap the ‘Edit‘ option. Edit the saved bookmark by deleting the URL string from within it and paste in the copied JavaScript code string from step 1.

Step 4: Save the bookmark. Whenever you find yourself opening a link that invokes Safari, tap the ‘Bookmark‘ button and then select the ‘Open Chrome‘ bookmark. The currently open page will then open in the Chrome browser thanks to the JavaScript wizardry we just went through.

Whether Apple will implement the option to change the default browser on a device in the future is anyone’s guess, but the more informed believe this will never happen due to Apple’s tight hold over how a device is used. Until we wait and see what the future brings, Abrams’ solution is definitely a lot quicker than copying and pasting URLs across browsers, especially for those of you who are sporting a non-jailbroken iOS device.

(via Lifehacker)

You can follow us on Twitter, add us to your circle on Google+ or like our Facebook page to keep yourself updated on all the latest from Microsoft, Google, Apple and the web.