Computerworld

Chrome secrets: Dig into Google's new browser

A handful of tips and tweaks to get the most out of Chrome
Using the <b>Google Chrome Options dialog</b>, you can tell Chrome to start up by reopening all the tabs you had open when you last closed the browser.

Using the <b>Google Chrome Options dialog</b>, you can tell Chrome to start up by reopening all the tabs you had open when you last closed the browser.

Google's Chrome is a stripped-down, no-nonsense browser. Unlike Firefox, there isn't an array of add-ons available to change its behavior. So at first glance, you might think there's not a lot you can do to hack Chrome or bend it to your will.

Think that and you'd be wrong. In fact, there are plenty of secrets hidden beneath Chrome's shiny surface. Whether you want to do something as simple as reload the past 10 tabs you've closed or something fancier like force Chrome to use a different theme, peer into the mysteries of the Chrome "about:" page, or power up Chrome with "bookmarklets," we've got help for you.

Power up Chrome with bookmarklets

Firefox fans will be disappointed by Chrome's lack of add-ons. Chrome is still in early beta, so there's a possibility that add-ons will be in the browser's future. But even now, there are ways you can use add-ons to Chrome, via bookmarklets.

Bookmarklets are little pieces of JavaScript that you can store as a bookmark, and when clicked upon, they run as a kind of miniprogram. They don't include a full set of features and interactivity, as do Firefox add-ons or Internet Explorer's ActiveX controls; think of them as one-trick ponies that accomplish a single task.

Because Chrome is in beta, not every bookmarklet will necessarily work with it. But there have been a number of bookmarklets written specifically for Chrome, and other bookmarklets work just fine with it.

To add a bookmarklet to Chrome, first display Chrome's bookmarks bar, which appears just below the Omnibox. (Pressing Ctrl+B toggles the bookmarks bar on and off.) Once you do that, when you get to a page with a bookmarklet link, drag the link to the Chrome bookmarks bar. Once it's there, to run the bookmarklet, click on it.

The Blogote blog has a list of bookmarklets that are supposed to work with Chrome. You can drag the bookmarklets to Chrome's bookmarks bar from there.

For example, the "Adblock+" bookmarklet is useful for those who want to surf without a lot of flashing, noisy ads. While it won't block all ads, it can block third-party iFrames as well as ads with Java, Flash and music. After you've installed it, when you're on a page whose ads you want to block, click the bookmarklet, and it does its work.

For bookmarklets designed to work with many browsers, not just Chrome, head to the CyberNotes page on CyberNet. Unfortunately, although the site has icons to show whether each bookmarklet works with Firefox, IE or Opera, there's not yet a Chrome icon. So if you see a bookmarklet that looks interesting, just grab it and see if it works.

I'm a fan of the "View site's cookies" bookmarklet, which displays all of the cookies placed on your PC by the site you're currently visiting. The screenshot to the right shows both bookmarklets in action.

You can also do a Google search for bookmarklets and try each of them out with Chrome. Note that not all will work, and even those that have supposedly been tested with Chrome might not work with the latest version of the browser. (For example, I couldn't get the Gmail This bookmarklet to work. It's supposed to mail the current page via Gmail, but it didn't work in my Chrome installation.)

Page Break

Reload closed tabs

At first blush, Chrome appears to have one very serious shortcoming -- it doesn't seem to be able to reload tabs that you've closed, something that both Firefox 3 and Internet Explorer 8 can do. But there are in fact several ways to reload closed tabs.

If you want to reload the last tab you've closed, press Ctrl-Shift-T, and Chrome will open it for you. Want to open the tab you closed before that? Press Ctrl-Shift-T again. You can do this for up to the last 10 tabs you closed.

You can also use the New Tab page to reopen a tab you closed fairly recently. When you open a new tab, you get a page showing thumbnails of your nine most-visited sites, plus blue search and bookmarks boxes on the right. If you closed any tabs within the past few minutes, you'll also see a yellow box containing your three most recently closed tabs, which lets you skip directly to the site you want.

Finally, there's a setting that lets you start up Chrome displaying all the tabs that were open when you last closed it down. Click the Tools icon, choose Options, and on the Basics tab, select "Restore the pages that were open last," then click Close.

From now on, when you open Chrome, the browser will launch and reload all the tabs that were open when you closed it.

Give Chrome a new theme

Themes are a way to change the look and feel of a browser, including the background colors and icons. As shipped, the beta of Chrome doesn't appear to have any way to change themes, but be assured, future versions will.

In the meantime, you can change themes yourself, with a little bit of work. First, make sure that your PC is set to display hidden files via Windows Explorer. (In Windows XP, select Tools --> Folder Options, click the View tab, select "Show hidden files and folders," and click OK. In Windows Vista, launch Windows Explorer and choose Organize --> Folder and Search Options, click the View tab, select "Show hidden files and folders," and click OK.)

Once you do that, you need to locate Chrome's Themes directory. In Windows XP, go to

C:\Documents and Settings\username\Local Settings\Application Data\Google\Chrome\Application

In Vista, go to

C:\Users\username\AppData\Local\Google\Chrome\Application

In both cases, substitute your username for username.

When you're in that folder, look for a subfolder that matches Chrome's current version number -- as I write this, the version is 0.2.149.29. (To find out Chrome's current version number, in Chrome click the Tools icon and select "About Google Chrome.") Then look for the Themes subfolder.

So, for example, as I write this, the themes folder in Vista is

C:\Users\username\AppData\Local\Google\Chrome\Application\0.2.149.29\Themes

In the folder, you'll find a file called "default.dll," which is the themes file. To use a different theme, you'll need to replace that file with a different default.dll, which contains the theme you want to use. There are quite a few of them available on the Internet, as I'll explain in a few paragraphs.

Close Chrome, then rename the default.dll file to something like "originaldefault.dll." Then copy a new theme into the directory, making sure it has the filename "default.dll." After that, launch Chrome, and your new theme will be in place. To revert to your original theme, delete or rename the new default.dll you're using, and rename "originaldefault.dll" back to "default.dll."

Google hasn't yet created themes for Chrome, but plenty of people on the Internet have already. Do a Google search for Chrome themes, and you'll find them. Try the Pitchblack theme at DeviantArt or several found at the Google Chrome themes blog. Another good place to find them is at Chromespot.

If you're a Red Sox fan like me, there's even a Red Sox Chrome theme available. It's a bit flaky, though, and reading the text on the top of your tabs can be difficult. Still, when it comes to rooting for the Sox, sacrifices are always in order.

In addition, there's a beta of a Chrome theme manager called XChrome, which provides a graphical user interface for installing and managing themes. Keep in mind that it's beta, so download and use it at your own risk. The software will also ultimately be available at CTheme.net.

Page Break

Manage your downloads

Chrome's download manager is a surprisingly good one, even if it is a bit hidden. Before you start downloading, set your default download path by clicking the Tools icon, selecting Options, clicking the Minor Tweaks tab, browsing to your default download location, and clicking Close. If you want to be asked where to download a file each time, check "Ask where to save each file before downloading."

Chrome's download feature lets you pause and resume downloads. When you're downloading a file, press Ctrl-J to open the Downloads tab. From here, you can pause and resume downloads as well as manage files you've already downloaded. You can also click any download to open it, and click the "Show in folder" link to open the folder that contains the download.

Downloads also show up at the bottom of the tab from which you've downloaded them, as you can see below. Click the download button for each. From a menu that appears, you can open the file and open the folder that contains the file. You can also drag the button to your Desktop or a folder in Windows Explorer and move the file there.

Peer into the mysteries of Chrome with about: pages

Chrome has a special syntax that allows you see a great deal of information about the browser's operation, including the memory it's using, its cached files, its plug-ins and more. Just type about: followed by the appropriate switch in the Omnibox (the name for Google's Address Bar).

For instance, to see the version of Chrome you're running, as well as the version of the browser's WebKit rendering engine and other version information, type about:version in the Omnibox.

Here's a rundown of some of the most interesting and useful about: pages:

about:memory

This displays the memory used by Chrome, including the memory used by each tab and by plug-ins such as Flash. If you're running another browser, it will also display that browser's memory use, although it won't break it down by individual tabs.

about:cache

This lists every item in Chrome's cache, including pages, individual graphics, and so on. There's a link for each item. Click the link, and you'll get more information about that item.

about:plugins

This lists all of Chrome's installed plug-ins, such as for Flash, Acrobat, and RealPlayer. Interestingly, there is an ActiveX plug-in installed in Chrome by default, but it's unclear whether it will properly run all ActiveX controls.

about:dns

This page gives information about one of Chrome's speed-up features. When you visit a Web page, Chrome does a DNS resolution for the IP addresses of the links on the page. In this way, when you click a link, Chrome already knows the IP address and sends you there faster.

The about:dns page displays information about Chrome's DNS use, including DNS records that it has prefetched.

about:stats

Ubergeeks will love this one -- it lists a mind-boggling array of statistics about the current state of the browser, none of which I understand. In fact, the only thing I understand on this page is the tongue-in-cheek title at the top: "Shhh! This page is secret!"

about:histograms

Here's another one for the supergeek set. I can make neither heads nor tails of it. If you can, tell the world about in the comments form at the bottom of this page.

about:network

This shows statistics about Chrome's use of the Internet or network in several different ways. For example, it shows every element on every Web page that Chrome contacts and whether the contact was successful, among other information.

After you launch the about:network page, click the Start I/O Tracking button. Then go to another tab and browse the Web as you would normally. Click back to the about:network page, and you'll see the network activity, including pages contacted, individual files downloaded and so on.

Similarly, you can track the browser's performance. Click the Start Profiling button, go to another tab and browse the Web, come back to the about:network page, and click Show Performance. The results page is a little confusing, but it shows the load time, byte size and more for all the elements on each Web page you've visited.

about:crash

Want to crash a tab? Then type in about:crash, and you'll do it and see the page pictured at right. Although developers might find this useful, for most of us it's a silly novelty, but still kind of fun to do.

about:internets

Showing that Google programmers still have a sense of humor, typing about:internets into the Omnibox launches a hidden Easter egg. I'm not going to ruin the fun and reveal what you'll see. (Hint: It has something to do with an Alaskan politician -- not Gov. Sarah Palin -- and his grasp of the Internet.) Windows XP users get a better Easter egg than Vista users because they get visuals as well.

Page Break

Use Chrome as a universal calculator and converter

The Omnibox has a nifty feature that you'll want to use -- it can perform calculations and convert between units of measurement, such as from inches to centimeters. To use the calculator, type in the calculation you want done into the Omnibox, such as 87 times 53 (or 87*53). You'll see the answer (4,611 in our example) appear in the drop-down list.

Similarly, to convert between units of measurement, type in the units and amount you want to convert, such as "8 kilometers in miles." You can also use abbreviations, such as "5 kg in oz."

Chrome performs this magic by using the same Google Calculator built into Google's search box. So if you use another search engine instead of Google as your default, the Calculator won't work. For an excellent guide to using the Google Calculator, see the Shortcut: Calculator page on the GoogleGuide site.

Launch Web sites in Chrome directly from Firefox

If you're a Firefox user who also wants to test out and use Chrome, here's a great way to get the browsers to co-exist: a Firefox extension that lets you launch any page in Chrome, from directly within Firefox. In fact, it will even let you tell Firefox to always open certain pages in Chrome -- for example, every time you type in the Gmail URL in Firefox, it can automatically open the site in Chrome instead.

First, go to the Open Websites in Google Chrome from Firefox add-on page. Then download the open-in-google-chrome.xpi file to your PC. After that, drag it into Firefox, and you'll launch the installation. Restart Firefox to complete the installation.

Once you do that, you need to configure the extension to work properly by telling it where to find the Chrome executable file. In Firefox, choose Tools --> Add-Ons and click the Options button in the Open in Google Chrome extension. The options page of the extension opens. Click the Browse button at the top of the page, and browse to the location for chrome.exe. In Windows XP, you'll find it in C:\Documents and Settings\username\Local Settings\Application Data\Google\Chrome\Application\, where username is your username. In Windows Vista, you'll find it in C:\Users\username\AppData\Local\Google\Chrome\Application\.

If you want certain sites to always open in Chrome when you visit them, type in a site's URL in the box at the bottom of the screen and click Add. Then click OK.

From now on, if you're on a site in Firefox and want to view it in Chrome, right-click the page you're on and choose "View this page in Google Chrome." To open a link in Chrome, right-click the link and choose "Open Link in Google Chrome." And when you visit pages you've specified to be viewed in Chrome, they'll always open in that browser, without requiring you to take any action.

By the way, if you're a Firefox user who likes the look and feel of Chrome but don't want to switch to the beta, you can get a free extension called Chrome Package that makes Firefox look more like Chrome.

Use Chrome keyboard shortcuts

If you don't like to spend your time mousing around, Chrome has a full set of keyboard shortcuts, many of which are shared with other browsers. For a complete list, go to Google's Chrome keyboard shortcut page.

Search alternate sites from the Omnibox

This tip isn't exactly a secret, but it's just too useful to leave out. Anyone who uses Chrome knows that the Omnibox doubles as a search box. You set your primary search engine (Google by default) by right-clicking the Omnibox, selecting "Edit search engines," choosing a site from the list and clicking Make Default. But you can also use a nifty shortcut to do a quick search using any search engine you've previously used in Chrome.

Type the first letter or letters of the site's URL, such as "y" or "ya" for Yahoo, then press the Tab key. A Search site button like the one shown below appears. Type in your search query to search using that search engine.

There's a small gotcha to keep in mind with this trick: If you haven't already visited the Web site and done a search, the Search site button won't appear. But it should work for any site at which you've previously searched, as long as the site adheres to the OpenSearch standard.

To tell whether a site adheres to the standard, visit the site and do a search, then right-click the Omnibox and select Edit Search Engines. If the site you're on appears in the list in the Search Engines dialog, it does follow the OpenSearch standard. Only the search engines that appear in this list will be able to use the Tab key trick.