What’s New in Google Chrome 12

Tweet

Chrome 12 was released last week. You didn’t notice? Few people did. I hadn’t intended writing this article but a few people on Twitter convinced me otherwise (thanks @Mahen23). To start, let’s take a look at the usual list of improvements:

  • hardware-accelerated 3D CSS
  • the ability to analyze and delete Flash cookies within Chrome
  • a new safe browsing feature which protects against malicious file downloads
  • improved synchronization of browser settings
  • better screen reader support
  • new PDF save and print buttons
  • launch installed apps from the Omni-bar
  • 14 security holes plugged.

Chrome 12 also marks the end of an era: Gears has gone. Google Gears was launched in 2007 but development was abandoned a year later. The plug-in provided local data storage, JavaScript threading, desktop integration and geo-location but these have been superseded by standard HTML5 technologies.

Built-in JavaScript De-obfuscation

Merging and minifying JavaScript files has several benefits:

  1. Files, sizes and download times are reduced.
  2. Code processing speed can be improved.
  3. It hides your cutting-edge scripts from prying eyes.

Unfortunately, a minified script is impossible to debug. The code is an indecipherable mess contained on few lines which cannot have breakpoints set. Here’s an example from Google Analytics:

Chrome script debugger

Nasty. However, a quick right-click option will de-obfuscate the script into lovely readable source code:

Chrome script de-obfuscation

Built-in de-obfuscation is incredibly useful, although there are a couple of hitches:

  1. JavaScript minifiers often replace long function and variable names with shorter alternatives, e.g. MyLongFunctionName() becomes A(). De-obfuscation can never bring back the original names although you should be able to recognize patterns within your own code.
  2. Setting breakpoints on de-obfuscated code is more limited. Functions run in response to an event or timer can be analyzed. However, it’s not possible to break at code run when the page is loaded since the script has not been de-obfuscated at that point. Let’s hope the Chrome team address the issue in a future version.

For me, this is the most exciting development in Chrome. It may tempt you away from Firebug or Dragonfly when testing live code.

Have you discovered any great new features in Chrome 12?

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • Paul

    There are still bugs with “audio” elements also “required” form attributes, I’d hoped they would of been fixed in v12, gone over to Aurora now, also more reliable considering.

  • IT Mitică

    As always, the work done is not revealed in shiny front icons but noticeable mostly behind the scenes. One must at least acknowledge there is hard work behind a browser, no matter what browser it prefers. I certainly am user enough to give Ch credit where it’s due.

    That said, I am placing Ch second in my preferences, and that because some personal developer’s reasons, mainly because of the great add-ons FF world has to offer, and partly because Ch has some old bugs in areas I find to be of the essence, but it never got around fixing them.

    If those add-ons were to became browser independent, I’m sure FF would lose many users fast. Ch appeals more to new or inexperienced users because of it’s simplicity.

    It appeals to me because of it’s speed, though not enough to make me use it weekly even. I just test in it, to make sure I have Webkit covered, but I prefer FF and Firebug for development and surfing.

    The de-obfuscate thing though it’s a pretty good reason to stick to new versions of Ch. I didn’t know this one and I’m pretty sure someday it may save me from further work on my wall in my attempt to recreate the lunar landscape. Thanks Craig.

  • James

    I really love the idea of being able to de-obfuscate javascript, but I have Chrome 13.0.782.20 dev on Mac and it doesn’t appear to have that option in the context menu: http://cl.ly/7c6U

  • Nimrod

    There’s a fantastic video presentation from Paul Irish and Pavel Feldman about a lot of the awesome new stuff in the latest version of Chrome dev tools here.
    Includes things such as revision history, remote debugging, real time script editing and loads more.

  • Nimrod

    @James: the de-obfuscate in 13.0.782.20 is the pair of curly braces {} at the bottom left of the dev tools toolbar (right at the very bottom of the Chrome screen); last one, it’s called “Pretty print”.

  • BrenFM

    Yah… the page titles have been re-jigged. They now fad out on the far right hand side of the tabs. This means they fade out to almost the same colour as the closing “x” symbol.

    Kinda cute, but it kinda did my head in for the first couple of days.

    • Stjepan

      I really hate that

  • Joe Dirt

    Nah, I’ll stick with Firefox.

  • Khashayar

    Finally, @font-face support for unicode fonts.

  • http://twitter.com/Exabytes_US Exabytes Web Hosting

    I only noticed this after reading your post. Chrome automatically upgrade the browser without notifiying and of course the process is smooth without realising it. I could see only the changes of the icon. It looks different.

  • http://profiles.google.com/yaoqq2009 yao qq

    Google is a new star,twinkle in the sky.It really fast but I set Avant browser as the NO.1 browser in my computer.The developer team should pay more attention to its compatibility.

  • http://jimhoskins.com Jim Hoskins

    Right now in the Chrome Dev branch (13.0.782.24 dev Mac) this is not done from the context menu like pointed out in this article.

    In the toolbar below the script source, there is a button called “Pretty Print” with the icon “{ }” that does the same thing.

  • http://najafali.com Najaf Ali

    meh, in dev you shouldn’t be minifying or obfuscating IMO.

  • http://twitter.com/rolandboon Roland Boon

    Google keeps adding features to Chrome, but does this in a very sleek way without making the interface bloated with features. As a developer I really like the addition of hardware accelerated 3D CSS Transformations in Chrome 12. This is going to give tons of new possibilities in web development. I worked out an idea that I had for a while, but never thought it was really feasible to build. A folded Google Maps map: http://goo.gl/GQVMU

  • Srđan Prodanović

    Long method names that are replaced with short alternates can be fixed with find and replace. But that’s solving “minification”, not obfuscation. Obfuscation can go a lot further to conceal the actual method names.

  • http://www.alfystudio.com Ahmad Alfy

    doesn’t seem to work on dev built 13

  • alvinwriter

    Shockwave Flash still crashes with Chrome 12.

  • swan bella

    Google is a new star, twinkle in the sky. It really fast but I set Avant browser as the NO.1 browser in my computer. The developer team should pay more attention to its compatibility.

  • http://twitter.com/pierre_nel Pierre

    I’m not a huge fan of version 12 – I (and others) have noticed that sometimes urls just fail to load in new tabs – I’m sorry I upgraded :-/

    • http://www.facebook.com/geo.ariton George Ariton

      it looks like YOU have a problem, never had this problem in chrome :)

      • http://gilbert.im/ Gilberto Ramos

        me neither

  • http://www.christian-straube.de strauberry

    De-obfuscate code, I already love it ;-)

  • Christopher R

    Did they fix the memory leaks. When I had Chrome 10 installed after 8-10 tabs, Windows would tell me I’m low on HDD space, later found out that Chrome is caching to virtual space after using up all available RAM.

  • Christopher R

    Did they fix the memory leaks. When I had Chrome 10 installed after 8-10 tabs, Windows would tell me I’m low on HDD space, later found out that Chrome is caching to virtual space after using up all available RAM.

    • Anonymous

      A memory leak is when an app takes RAM and doesn’t release it properly when it’s done with it. So what you’re talking about isn’t really a memory leak, nor is it something Chrome can do much about. Each tab is essentially another web browser, and each one needs some RAM while it’s open. The more tabs you have open at once, the more RAM it will need. If it needs more RAM than you’ve got, Windows (not Chrome) will use its pagefile to simulate more (up to a point). The solution to your problem? More RAM. ;)