What’s New in Chrome 31

By Craig Buckler
We teamed up with SiteGround
To bring you the latest from the web and tried-and-true hosting, recommended for designers and developers. SitePoint Readers Get Up To 65% OFF Now

“Very little” is possibly the best answer. Chrome releases rarely offer a long feature list but there are a couple of interesting technologies to note.

Click the Tool icon followed by About Google Chrome to ensure you have the latest version on Windows, Mac or Linux. If you’re one of the few people who hasn’t installed the browser, head to google.com/chrome.

Auto-Complete Forms and requestAutocomplete()

Form auto-complete has been available in browsers for many years. Enter your email address and you can usually select it when prompted for it again on any other form elsewhere.

requestAutocomplete() is a new API which allows users to store often-used payment details such as credit card numbers. Rather than completing a checkout process, the user can select pre-defined payment and shipping values:


The HTML field autocomplete attribute can normally be set to “on” (the default) or “off” but Chrome extends this and allows you to set appropriately-named value such as name, tel, email, cc-name, cc-number, etc:

<form id="payment" method="/pay">
	<input autocomplete="cc-name" name="myname">
	<input autocomplete="cc-number" name="ccnumber">
	<input autocomplete="cc-exp" name="ccexp">
	<input autocomplete="cc-csc" name="cccvc">

The requestAutocomplete() method of HTMLFormElement shows the auto-complete choice when a button such as “Checkout” is clicked. An autocomplete event indicates a choice has been made and the form has been filled ready for submission. An autocompleteerror event fires if a problem occurs such as canceling.

The API is not yet a standard but seems straightforward and will progressively enhance existing forms. It’ll work well if users trust handing their credit card details to a Google application for safe-keeping.

For more information, refer to Using requestAutocomplete().

Portable Native Client (PNaCl)

Google’s Native Client (NaCl) is a sandbox for running compiled C/C++ code directly in the browser. In other words, you can download native low-level executables to the browser which run at near-maximum OS speeds. The technology is ideal for sophisticated high-performance applications such as video editors and 3D games.

To ensure NaCl works everywhere, it requires architecture-specific representations for all devices. In other words, developers must compile their applications multiple times to run across x86, ARM or MIPS devices.

The new Portable Native Client makes life easier by compiling C/C++ to an intermediate bytecode. When the resource is accessed, Chrome downloads and translates the portable executable to architecture-specific machine code which is optimized for the device where it’s being run. It’s a similar concept to Java and .NET.

NaCl (and PNaCl) is currently a Chrome-only feature which has a niche following. The technology makes me uncomfortable; taken to the extreme, I hope browsers never become executable distribution platform.

I also suspect the technology is a little ahead of its time. If you require native OS speed, you’re probably building a large application — so why not build it for the desktop? With care, you can make it work across multiple OSs and it will give you far more control over the user experience. It can then be distributed as a large executable which need only be downloaded and installed once. You can also sleep soundly at night knowing Google can’t pull PNaCl from under you.

The web works well because it’s OS/device agnostic and permits applications to leverage network connectivity for collaboration purposes. Raw speed is often a lesser priority, but NaCl/PNaCl enables Google to capture a larger share of the desktop application market.

Miscellaneous Updates

Other minor features include:

  • video alpha transparency in WebM
  • a new internal chrome://components page to check installed components
  • packaged apps can target specific URLs
  • a beta chrome.desktopCapture for capturing screens in extensions
  • a new chrome.sessions API for querying and restoring tabs in extensions
  • a new chrome.fileSystem API for file access from extensions
  • a redesigned Report an issue dialog
  • Chrome for Android allows websites to be added to the home screen
  • 25 security fixes

Developers will also let out a small cheer when they discover Google and Mozilla have decided to drop vendor prefixes for new CSS3 and JavaScript features. Unfortunately, you’ll still need those -webkit prefixes since they’ve not been removed from Chrome and will be required by Safari for some time yet…

We teamed up with SiteGround
To bring you the latest from the web and tried-and-true hosting, recommended for designers and developers. SitePoint Readers Get Up To 65% OFF Now
  • Anonymous

    I agree with your consternation regarding Native Client. I imagine that the arguments that Mozilla and other browsers make regarding Native Client are similar to the arguments against ASM.JS: it splinters the web when what we ought to be doing is just making the web generally faster.

    The one NaCl app I use frequently is Google’s Secure Shell: https://chrome.google.com/webstore/detail/secure-shell/pnhechapfaindjhompbnflcldabbghjo
    I think it uses NaCl because the cryptographic functions may have been too slow in JavaScript when they first built it. Now, however, it would be curious to see just what remains as technical blockers to implementing a good SSH client entirely in JavaScript…

    • Anonymous

      Thanks jokeyrhyme.

      While there may be some good use cases, Native Client simply allows Google to grab a share of the desktop application market – even though it’s a far more limited environment than standard OS apps. For that reason alone, neither Microsoft or Apple will implement it. There’s also no benefit for Mozilla since they’re promoting HTML5 as the standard development environment in their OS.

      I can see it being useful in Chrome OS but I doubt many vendors would choose to create sophisticated software for the platform when Windows, Mac OS, Linux, iOS and Android provides a better environment and many millions more customers.

  • Anonymous

    I think this update also sees :before and :after pseudo elements appear in the “Elements” tab of the developer tools. A handy little addition as it allows you to see the specific styles for the elements, and where they actually sit on the page!

    • Stuart

      Yes, I noticed that too – I thought there was some bug in my JS injecting weird stuff into the page! :)

  • Joan

    Chrome is an OS is an OS…

    • Anonymous

      I was referring to Chrome OS, the actual OS! Currently, it would be difficult to create certain apps on that, so NaCl makes sense. However, the same restrictions do not apply to Windows, Mac OS, Linux, iOS, Android, etc.

  • Anonymous

    Does it? That’s handy – probably more useful in all the other stuff mentioned above! I didn’t spot it in any Google announcements?

    • Anonymous

      Me neither, but I noticed it in the web inspector this morning after the update, so guess it was included somewhere! A very handy little addition though! Inspecting this page I can see that the “main” tag has a :before pseudo element right from the source, without having to check the CSS. Clicking on it gives me the styles for it in the “Styles” tab :-)