Why Web Developers Should Switch to Google Chrome

Why Web Developers Should Switch to Google Chrome

Check out Chrome 4′s great new features for developers, such as cross-platform support, awesome web inspector integration, and handy new extensions. It’s becoming more and more difficult to deny Chrome the title as the new browser for web developers. If it’s not quite there yet, it will be soon!

Introduction

With quick load times, a snappy JavaScript engine, solid WebKit foundation, and big-name backing, Google Chrome has been gaining a respectable market share, even surpassing Safari to become the 3rd most popular browser in December. For developers, however, Firefox has been the sweetheart of many due to its ability to run on any operating system and because of its rich offering of web development add-ons, such as Firebug and the Web Developer Toolbar. But it’s important to test JavaScript in all browsers, and having a robust set of tools in each (including Internet Explorer), is precisely what developers need to make the most of their code.

Lucky for us, the Google folks have been working hard to make Chrome cross-platform, integrate WebKit’s fantastic Web Inspector, and add extensions, making Chrome 4 an amazingly useful tool for web development. In this tutorial, I’ll demonstrate some of the features that make Chrome 4 a great addition to the web developer utility belt.

Downloading Chrome 4

As of January 25, Chrome 4 has been officially released as stable for Windows. Mac and Linux users, however, we have to be a bit more brave in order to experience all that Chrome 4 has to offer. Mac users need to download the “dev” version, and Linux users the “beta” version, and it’s highly worth it! Check out the following links to get a copy of Chrome for your operating system that supports everything we’ll discuss in this article:

Web Inspector (aka Developer Tools)

A screenshot of the Profile Panel of the Chrome Developer Tools

Now let’s get into the nitty gritty! In Firefox, Firebug is a godsend for developers, providing a debugging console, HTML & CSS manipulation, JavaScript profiling, and a whole lot of other goodness. The WebKit folks took notice and over the last couple of years have been perfecting a set of tools called the Web Inspector, which offers a similar set of features to Firebug. Within Chrome 4, the Web Inspector is labeled “Developer Tools.”

Accessing the Web Inspector/Developer Tools

A demonstration of how to access the Developer Tools on Google Chrome for Mac

In addition to Chrome 4, the Web Inspector has been in action for a while from within previous versions of Chrome and Safari, although it’s a bit hidden. To access the Web Inspector in various browsers:

Safari 4

  • Select “Edit > Preferences” (Windows) or “Safari > Preferences” (Mac)
  • Select the “Advanced” tab
  • Check “Show Develop Menu in menu bar”
  • A new menu item, “Develop,” will appear
  • Select “Develop > Show Web Inspector”

Chrome 3 (Windows only)

  • Select the Wrench
  • Select Developer
  • Select JavaScript Console (the whole range of tools are hidden under this name)

Chrome 4

  • Windows / Linux: Select the Page Icon > Developer > Developer Tools
  • Mac: Select View > Developer > Developer Tools

JavaScript Console

A screenshot of the Console Panel within the Chrome Developer Tools

If you haven’t worked with the Firebug or Web Inspector console, then you’re missing out on a great way to help debug JavaScript. The JavaScript console serves several important functions, such as capturing errors and presenting them in a useful format, testing short bits of JavaScript, and as a convenient place to log useful information like variable values and execution times. Practically speaking, I use this tool regularly to evaluate the performance of my programs and to ensure that certain variables are being calculated correctly.

Elements Panel

A screenshot of the ELements Panel within the Chrome Developer Tools

In addition to the JavaScript console, it’s always nice to have a tool that allows you to quickly view the HTML and style information of particular elements on the page. The Web Inspector Elements panel gives a tree-structure view of the Document Object Model (DOM), allowing you to drill down into the document to select an item of interest. You can also access the information of a certain object by right clicking on an item within the browser and selecting “Inspect Element.”

Finally, I should note that the Elements panel allows for much more than simple inspection. You can modify and add styles, edit html, and in the latest versions, view event listeners attached to a selected DOM element. These features can all come in very handy when you’re dealing with little quirks that you can’t quite figure out.

Resources

A screenshot of the Resources Panel within the Chrome Developer Tools

The last feature I’d like to highlight within the Web Inspector/Developer Tools is the “Resources” tab. If you’ve worked with Firebug’s “Net” tab, then you’ll notice several similarities. Essentially, the Resources tab gives a breakdown of all the information that is exchanged between your browser and the server, from the images to the JavaScript to the document itself. It also shows a ton of handy information, such as:

  • A graph of the time it takes to download each component
  • A graph showing the size of the various components
  • A way to sort the requests by type, e.g. Documents, Stylesheets, Images, etc.
  • Image previews with dimensions, file size, and MIME type displayed below
  • Request and Response Headers
  • XML HTTP Request (XHR) information

An elegant tool that allows for easy inspection of page speed, the Resources tab can aid you in identifying and squashing performance bottlenecks. Give it a try and see where your page is too fat, then slim down your chunky images and code to provide a better experience for your users!

Further Reading

A complete overview of the Web Inspector/Developer Tools could easily be a tutorial on it’s own, but we have more ground to cover! I highly recommend checking out the following resources to learn more:

Extensions

Now, while I’ve always been blown away by the speed of Safari 4 and Chrome as compared to Firefox, they’ve both lacked a critical feature: add-ons. In Chrome 4, that all changes with the addition of “extensions.” You can add functionality to Chrome by downloading and installing extensions or by using the standard tools of the trade: HTML, CSS, and JavaScript, to write your own. Extensions can be downloaded from the Chrome Extensions Repository, and should be fairly simple to install. Already, a number of very compelling extensions have been created which aid web development, from quick validation to resolution testing. Let’s take a look at a few.
        

Speed Tracer

A screenshot of the Speed Tracer extension

A web developer can never really be obsessed enough with performance, and the more tools that identify sluggish performance the better. That’s just where Speed Tracer, a Chrome extension developed by Google, comes into play. Speed Tracer takes the “Resources” panel to the next level by providing a visualization of the time it takes to execute low-level tasks, such as rendering CSS or parsing HTML and JavaScript. I’d highly recommend taking a look at a video demonstration of Speed Tracer put together by the folks at Google to get a better idea of how it can help you improve the performance of your applications.

Pendule

A screenshot of the Pendule extension

Moving from Firefox to Chrome, one extension everyone is going to look for is a replacement of the fantastic Web Developer Toolbar. For those who don’t know, the Web Developer Toolbar deals with the tasks Firebug wasn’t meant to handle, such as quick validation of HTML and CSS, the ability to quickly disable JavaScript or images, and a tool for checking links. Those functions are all handled with style by Pendule, which offers much of the core functionality of the Web Developer Toolbar (not quite all), while offering a few goodies of it’s own, such as a color picker.

Resolution Test

A screenshot of the Resolution Test extension

Web Developers often need to ensure that their designs work at a variety of resolutions. Resolution Test allows developers to efficiently resize their browser window to a number of common resolutions for quick and easy testing. The latest version even allows you to open multiple windows at different resolutions with only a couple of clicks. Resolution Test is fantastic for making sure your target audience is seeing the page you want them to see.

Webpage ScreenShot

A screenshot of the Webpage ScreenShot extension

There are occasions when its necessary not only to grab a screenshot of the current visible portion of a website, but a screenshot of the whole page. For example, you may want to print a full page for peer critical review or to demonstrate in your portfolio. I formerly used a Desktop tool for this, but now Webpage ScreenShot does a nice job of capturing full-page screenshots in a few clicks.

Chrome Sniffer

A screenshot of the Chrome Sniffer extension

Do you ever stumble upon a fantastic page and wonder, “what are they using to build this?” I do, and often find myself digging through the source code trying to figure out who the man behind the curtain is. While it is a useful training exercise, and a necessary one if you really want to know what’s going on, Chrome Sniffer can usually give you a snapshot of which JavaScript and PHP frameworks are in use for a particular page. For example, navigate to NetTuts and Chrome Sniffer informs us that it’s run on WordPress using Google Analytics and jQuery.

Conclusion

The future of web development continues to look brighter and brighter! While only a few years ago we had a limited set of tools for debugging JavaScript, tinkering with CSS, and viewing HTML, today we have a variety of powerful options. Now that Google Chrome has become cross platform, fully integrated the WebKit Web Inspector, and added extensions, it is a versatile tool for helping developers improve their own pages. I encourage all of you to download a copy for yourself and give it a shot to see if it can help you improve your pages, then come on back here and share your favorite plugins and tools with the rest of us!

Write a Plus Tutorial

Did you know that you can earn up to $600 for writing a PLUS tutorial and/or screencast for us? We’re looking for in depth and well-written tutorials on HTML, CSS, PHP, and JavaScript. If you’re of the ability, please contact Jeffrey at nettuts@tutsplus.com.

Please note that actual compensation will be dependent upon the quality of the final tutorial and screencast.

Write a PLUS tutorial

Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • http://www.dynamicwp.net/ Eko Setiawan

    I just try chrome 2 month, and I feel my internet connection with dial-up modem.. more stable now than if I use Firefox.
    Hi, thanks…for this article

  • Glenn

    I switch do Chrome directly when the get same good tools equal to Firebug!

  • http://insicdesigns.com insic

    Im a chrome user since the beta version is release. And this is a great browser Nice article

  • http://blog.lytecube.com Girish

    I have tried chrome in its early days, but I never considered it a serious tool for development. I mean I’m not really a web 2.0 devoloper. But your article has me running for the download, will try it out on some of my projects. Thanks for the details..

  • http://www.contactbridgeites.com/ Contact Bridge ITES Pvt. Ltd.

    Contact Bridge ITES is a premier Software Development company. We are committed to deliver high quality services equipped with latest techniques & furnished with current market strategies, focusing entirely on customer requirements. We expertise in Web Designing, Web Development, Search Engine Marketing, Search Engine Optimization and E-Commerce Solutions.

  • http://www.twitter.com/netjunky88 Eugene

    I wonder, how can I use the storage feature in those development tools? Is there any explanation?

  • http://planetozh.com/ Ozh

    One word: Firebug.

  • http://superdit.com aditia

    I will move to chrome if there already flash blocker extension, so is evebody knew???

    Firebug is already exist in chrome but not as good as firebug in FF, cmiiw

  • Fez

    I don’t know if this has already been mentioned in the comments but one of the things I hated about firebug was that it used to lag the hell out of some of the webpages. I had to constantly disable and re enable it when switching from casual web browsing to web developing. I love the built in element inspector and I couldn’t believe that I never noticed it there before!

    It was the only reason I used to give people, saying, “there is no firebug or firebug like addon for chrome”.

    Who needs an addon when its built in :D!

    Now i’m just waiting for Internet Download Manager addon for chrome, and then its bye bye firefox!

  • flexo

    Firebug is way more comforable to use and better arranged..This is the only reason i use Firefox and will stick with it.

  • Luca

    in my opinion, chrome’s webkit dev tools pretty suck.
    they’re not implemented in the ui like safari’s devtools and they’re not updated like a webkit nightly build.

    i always develop on webkit nightly builds, but i think firebug is the most beautiful, fast, intuitive and un-invasive tool for a developer.

    too much and too big stupid button for webkit devtools :D

  • begs

    “Chrome Sniffer” sounds really nice. Is there a Firefox extension that does the same?

  • http://www.crearedesign.co.uk Stephen Webb

    Chrome appears to be a very powerful tool and one that is going to become an invaluable resource for web developers. With its big name developer it will clearly get a huge push, and there is already evidence of this will the numerous billboard adverts for Chrome that are around the UK.

    The applications covered here will certainly come in very useful for all developers, and offer an insight into web pages like never before. The pace of web development in general appears to be increasing and technologies are now really coming into their own, so it is an exciting time or the web.

    I’ll be interested to read what experiences developers have had so far with Chrome, and the general consensus regarding Chrome versus Firefox. We could certainly see Chrome overtaking Firefox in the near future if its development continues at this pace.

  • http://afolio.info/howabout/ Amarino França.

    I think that the only advantage of Chrome in relation to Firefox it’s the lower use of the PC’s performance.

  • http://www.ideaprison.com ideaprison

    i never liked Chrome, weird UI revolution i just dont like it.
    other than that, im happy holding hands with FF and Firebug.

  • http://disordereddesign.com Krystian

    I’m using Google Chrome to see resources. I like that intuitive and simple way of analyzing whole web page. The fact remains that Firefox with its addons dominates and will dominate.

  • arnold

    Chrome is the one that I use when surfing or searching some articles because its so fast , no doubt about that… but in web dev. probably I still stick with firefox.

    thanks for the article btw…

    hmm still waiting for some cool css tutorial at nettuts

  • http://thecybertramp.com stella

    huh no chrome for os x tiger

  • noyb

    Chrome is a bad joke even for regular users. For developers is completely useless.

  • sweetl80

    The native web inspector is excellent, tho i do miss the ‘inspect’ functionality that firebug has. That said, its profiling tools are far more comprehensive.

    Iv found it far more stable and far speedier, so its my main browser, and has been for a long time now!

    S

    • http://brianegan.com Brian Egan
      Author

      You can still get at an “Inspect” feature! If you open the tools, there are four icons in the bottom-left corner of the panel. Click on the “Magnifying Glass” icon and then click on which element you want to inspect. Voila!

  • Arthur Corenzan

    Hey, great article, but the extension you mention to capture web screenshots is a total fail! The Aviary one is the best I’ve ever seen. Anyway I just found out about another one that seems to be great.

    Aviary screenshot extension;
    https://chrome.google.com/extensions/detail/ncgcgghbabbopfcpgcjpfffdgnbadegf

    Picnik screenshot extension;
    https://chrome.google.com/extensions/detail/hcifofgaphfkfdcjbdogpamghiihilkl

    • http://brianegan.com Brian Egan
      Author

      Haha, darn! It worked well for me, but since it’s all beta software I wouldn’t be surprised if it broke. Thanks for the links to the other ones!

  • http://frostpress.com Matt

    I’m a proud Chrome user (former Firefox) and I approve of this post!

  • That Guy

    I like chrome because its simple and fast so browsing is great on it. I still prefer Firebug and its many extensions over the Chrome Developer tools.

  • http://www.vagrantradio.com Jason

    Great article, but..

    The Firebug extension is only the light version and is very limited, plus there is no FirePhp for Chrome as far as I can tell. Sure, the developer console makes up for a portion of that, but why use two tools when I can just use one.

    I rely heavily on Firebug and Web Developer Toolbar, since Chrome limits too many of the functions that are already there in Firefox I can’t justify switching or “trying” it and still get my job done.

    If speed is the main selling point aside from the mentioned plugins, once you add all this to Chrome, it’s going to be slow also.

  • Marcio Toledo

    I agree that Firefox is a ‘memory pig’, and also it has a really slooow rendering… Firefox is totally overrated.

    Firebug Lite works in G. Chrome
    Opera’s Dragon Fly is awesome for debugging

    Abandoned Firefox… oh nice article, by the way.

    • peter meyer

      yet another FUD post. chrome uses far more memory than firefox.
      rendering speed? i guess you mean js-performance?

      • Márcio Almada

        Well, just try it yourself. Opera renders much better and much faster. Even when accessing a local website, Firefox takes a few milliseconds to update the screen (sometimes seconds), in Opera you don’t even see the the blank screen blinking in front of you. Also, GC has a better render engine too.

  • http://www.gregprogramming.com Greg

    until chrome has something as powerful as Firebug then there really is no point developing with it. I tried it out for a while but the Webkit Developer tools just don’t cut it.
    Like others I use Chrome to browse and for daily activity but Firefox for web development.

  • http://www.jordanwalker.net/index.php Jordan Walker

    I use Chrome on Ubuntu and am having lots of success, except that it does not support flash :-)

  • Adardesign

    no one beats firebug yet.

    No argument…..

  • http://www.chrispierre.com Chris Pierre

    Sounds pretty useful, I am definitely going to download this and try it out. And the Pendule feature seems pretty cool also, but at the end of the day for now firefox still wins but in the long run once chrome catches up with firefox’s functionality and add-ons I believe chrome will surpass due to is aesthetics.

  • http://www.juliemazziotta.com Julie Mazziotta

    Nice to discover all the tools. Will give it a try. Is there a similar trend for SEO extensions?

  • http://fraguto.heliohost.org Octo Fraguto

    Chrome, a real browser,
    other important thing is the V8 Javascript engine that makes the JS faster, then
    the css3-webkit- support. Javascript database functionallity and the HTML5 full functional.

    IS2Chrome hehe.

  • jem

    I don’t develop FOR Chrome (because my clients don’t require it), so I don’t really use it for anything. I agree its developer tools are comparable to Firebug, but until Chrome’s representation in the web starts to tip the scales a bit more I don’t care to work with it (its at about 10% right now, whereas Firefox is at ~46%).

    The most comforting thing is that I know Chrome is an excellent browser thats built on Webkit, and I seldom ever see differences in rendering from Firefox to Webkit-based browsers. Because of that, I don’t even feel a need to open it to check sites.

  • http://gravitmad.com Chris

    You don’t develop FOR Chrome. Its based off webkit for the most part. If you develop correctly, it should just work.

    Also, can you say “Safari”?

  • http://eschrader.com Eric Schrader

    “Why web developers should switch to Google Chrome” It has all the features that other tools do and is not a browsing standard. :D

    This article is helpful for cross browser programming when dealing with Chrome, but not a reason to switch.

  • tuan

    I’ve been doing all this on Firefox for years before Chrome was even out. Why should I switch now? When I read the title of this post the only thought on my mind was “Has this guy ever heard of Firebug?”

    Chrome is still lacking a lot in terms of customization. Not just the lack of extensions but also basic features. For example, if I want to turn javascript off, I’d have to close the browser and start it with a command line parameter. In case an extension exists, I’d still need an extension just to toggle a few simple browser features. There’s no about:config either. Don’t get me wrong, it’s a great browser but I wouldn’t develop with it or use it for daily surfing. I like being able to customize my browser to do what I want and no other browser can beat Firefox in that department.

  • http://www.ryanreed.net Ryan Reed

    I’ve really wanted to make the switch to Chrome at work but it has some annoyances that really cause headaches. We have an external application that launches with a link like

    ckp://something@something@SomePolicy

    Unfortunately, Chrome seems to change the link to the following
    ckp://something%40something%40somepolicy

    The converting of @ to %40 can be fixed in the batch file we launch but the changing case to all lower case is a problem I can’t get past. I opened a ticket to report the bug. Hopefully it gets fixed as I have been enjoying Chrome quite a bit

  • ShadowAssassin

    This is still not a good enough reason for us to use google chrome, because as another person said here, google already collect enough data from me. While I do have chrome on my computer, I never ever used it for web developing, just for testing my website, firefox has many many more tools which chrome will never have and that is why Firefox will always and forever be the best tool for web developing (because of the extensions, such as firebug, web developer, colour picking tools, website loading times tester, themes (not so much helpful for web development, but you get my gist)

    And I suppose Google Chrome: OS will be the new OS to develop on…(rolling eyes)

    • http://brianegan.com Brian Egan
      Author

      For all of those with privacy concerns: Chrome does have some fishy stuff going on, and I can understand why you wouldn’t want to switch. Personally, I don’t care. That’s a choice we can all make for ourselves, and Windows Users can also check out SRWare Iron for a less-troubling Chrome experience.

      However, when you say that “Firefox will always and forever be the best tool for web developing (because of the extensions, such as firebug, web developer, colour picking tools, website loading times tester, themes” I become totally baffled. My article discusses replacements for each one of those items on your list.

      I’m all for people still using Firefox, it’s a great browser. I just want to open up people to multiple options for Web Development.

  • Paul

    Still sticking with Firefox for now, but this article has resurrected the Chrome!

    Now if only IE would go away…

  • Mads Aune

    Very nice article! i realy like chrome, but the main reason why I havent changed to chrome from firefox yet is because of firefox’s addons, but now they exist in chrome too! Thats just great!

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

    I always say comments and interaction contain more useful information than the original post… Thank you Brian and Fez

    • http://brianegan.com Brian Egan
      Author

      Thank you too! I really enjoy good discussion, and you’ve been asking great, open-ended questions and been willing to learn, and been respectful when in disagreement.

      Great attitude! Vigorous, respectful debate and challenging questions are the keys to progress for any community.

  • http://dseerden.com Durgé

    Browser War II xD.

    I dare all Firefox people to work with only Chrome for a couple of days. It’s hard to switch something you’re used to, but I really think you would like it. Then compare again.

    It’s time for Firefox to rewrite everything to make it faster, plus they really need to do something about the interface, it takes to much space.

  • andy

    lightweight fantastic stuff!!

    you have saved my nerves, thank u Brian!

  • http://levelx.me Kryptic

    Chrome and Firefox are future of Web.
    Die IE

  • http://www.userkind.com Cory

    The only thing keeping me from completely switching to Chrome for web dev is the lack of an inline css editor. The one available in the web developer tools plugin and the firebug plugin in firebox are both excellent.

    Looking forward to switching solely to chrome as soon as this tool is available.

  • Capa

    Great article!
    One thing though that I haven’t been able to figure out.
    Say that if I modify a css file in the Developer Tools of Chrome, is there anyway I’m able to save this file locally?

  • http://eisabainyo.net/weblog/ ESN

    Chrome is growing on me and I use it from time to time. I am starting to enjoy its minimalist interface and speedy performance. But my favourite browser is still Firefox.

  • http://katadrew.com drew

    Thanks for the post! After reading, I unpinned FF from the taskbar and put Chrome in its place.

    One thing that had kept me from Chrome was that it didn’t play nice with an auto-hiding taskbar. Seems to be resolved in the latest version though.

  • Naveed Punuhan

    The article is excellent. But one question is that why chrome is copying the most features of Safari. It seams the blue print of Safari. Kindly check the features of Safari here. Although I am replying this in FF.

    http://www.apple.com/safari/features.html

    Just Amazing….

    • http://brianegan.com Brian Egan
      Author

      “Good artists copy, great artists steal” -Pablo Picasso.

      Safari has a great Webkit foundation and generally does a lot of things well. I don’t think Google should be reinventing the wheel too much for feature such as, “Complies with Acid 2 & 3.”

      They have, however, totally changed the JavaScript speed wars with V8, which has forced Firefox and Safari to really step up their own JavaScript engines. I think Google was smart — took the parts that worked well (from both Safari and Firefox) and optimized them, took the parts that weren’t as good and rewrote.

      In addition — Safari doesn’t support the one thing that it would take for me to switch – extensions/plugins. Chrome has those now, which is a huge advantage for me personally over Safari.

      Thanks for the feedback!
      Brian

  • TaLLóN

    Joshwink es una maricona!

  • ySchaub

    I won’t use anything made by google except their search engine. Don’t let google control your life :D