Get $500+ of the best After Effects files, video templates and music for only $20!
5 Excellent New Features in Safari 5

5 Excellent New Features in Safari 5

On June 7th, Apple released an update to their web browser, Safari 5. It includes a plethora of new features for web developers, including a faster JavaScript engine, better HTML5 support, extension support, and a great Web Inspector update. We will explore what these new features mean for web developers.


1. Improved Web Inspector

A good web inspector is extremely important to most web developers. Many people still prefer Firebug, which is an extension for Firefox, but the Webkit inspector has improved dramatically in the last few years.

CSS Inspector

In Safari 5, the web inspector has an improved CSS inspector panel, which lets you jump directly to a rule definition in the source file.

DOM Inspector

The DOM inspector is much improved, now allowing you to add attributes to DOM nodes in your document, remove nodes, and edit nodes as HTML, which lets you edit the entire tag as if it was a source file.

Resource Panel

The Resources panel is also improved, letting you see all HTTP redirects, along with full header information, including the HTTP status code.

JavaScript Inspector

The JavaScript inspector now lets you disable all breakpoints with a single click, and if you hover over an element while on a breakpoint, you can see the actual object values of what you are hovering over. This will be extremely useful for debugging purposes!

Timeline Panel

Safari 5 now has a new Timeline Panel, which provides information about everything that the browser is doing while you browse. This includes loading data, parsing it, laying it out on screen, and rendering it. Very cool for working on the performance of your website or application.

Audits Panel

Another added panel is the Audits panel, which much like the popular YSlow and Google Page Speed extensions for Firebug, suggests ways for you to improve the performance and compatibility of your site.

Console

The last change to the Web Inspector is that a separate panel for the JavaScript console has been created. This is nice because it allows the console to take up the entire height of the Web Inspector rather that the small part that it used to. It is still available in the old location, however, for convienent access while looking at another panel. For more information about the updates to the Web Inspector, check out this post on the Webkit blog.


2. Better HTML5 Support

Apple touts seventeen new HTML5 features in Safari 5, and you might have heard of their HTML5 showcase that they launched last week (it really contains more CSS3 than anything else, but that seems to be getting lumped under HTML5 as well!). Apple really seems to be pushing HTML5, and Safari 5 now has a score of 136 on html5test.com which is up from 113 in the previous release. Some of the new HTML5 features contained in Safari 5 include:

  • support for fullscreen video with closed captioning
  • geolocation
  • HTML5 AJAX History
  • drag and drop
  • nearly all of the HTML5 input types
  • official support for the new HTML5 elements such as <article>, <header> and <footer>.

Check out the complete list below.

Features For Realtime Webapps

Safari 5 includes two new HTML5 features for realtime webapps, like Friendfeed and Twitter. WebSocket is the first, and EventSource is the second. Now that three of the major browsers, Firefox, Chrome and Safari have implemented the WebSocket spec, writing realtime webapps using something like Node.js for a backend is becoming much more feasable.

WebSocket is essentially a two-way communication channel between your webapp in the browser and the server.

Since it is two way, you could write something like a Twitter client using it, and have new Twitter messages automatically appear as they are pushed from the server, and also push new tweets up as they are written. EventSource is a one way communication mechanism which allows the server to send events to the client but not the other way around. If you want to learn more about EventSource, check out this tutorial.


3. Extension Support

Because it is written using these technologies, it will be possible for someone to write a cross platform extension development library that works across Firefox (Jetpack), Chrome, and Safari 5.

There is now extension support in Safari, and, thanks to a new tool called Extension Builder in the already useful Develop menu, you can write your own. The extensions are written using standard web technologies, including HTML, CSS, and JavaScript and the Extensions API provided by Apple. Because it is written using these technologies, it will be possible for someone to write a cross platform extension development library that works across Firefox (Jetpack), Chrome, and Safari 5. All of them use web technologies to build extensions for their browsers. For security, all extensions for Safari 5 must be cryptographically signed by Apple through their Safari Dev Center.

Later this summer, Apple will open the Safari Extensions Gallery which will give users an easy place to find an install extensions. Panic is already showing off their extension called Code Notes, which, when it comes out, will allow you to add annotations to web pages by drawing and writing text notes directly on the site. The extension will then allow you to share your annotations via email. A very cool example of what the Safari 5 extensions API is capable of.


4. Faster JavaScript Engine

It wouldn’t be a complete browser upgrade if Apple didn’t tout their 30% faster JavaScript Engine. In the SunSpider JavaScript performance test, Safari ranks similarly to Google Chrome, and is still far ahead of the latest version of Firefox. While JavaScript performance is important, the real performance bottlenecks for web applications do not lie in the raw JavaScript language performance, but in the DOM API, which is notoriously slow in all browsers. I hope more attention is payed to DOM performance in the future.


5. Safari Reader

While not specifically a web developer feature, I’m sure you read a lot of articles like this one around the web. Safari Reader is essentally a way to get all of the destractions out of your way while you read just the article. Much like the Readability bookmarklet, Safari Reader auctomatically recognizes pages with an article in them, and presents a button in the toolbar that extracts the text and images from just the article section of the page and displays them in a nice readable font. It is also very nice that you can easily email and print just the article while you are looking at the Reader view. I’m sure that I will use this a lot!


While not a major release in terms of user features, Safari 5 is a very nice release for developers. With much better HTML5 support, increased JavaScript performance, and a better Web Inspector, Safari is now my development browser of choice. What about you?

Add Comment

Discussion 67 Comments

Comment Page 1 of 21 2
  1. Bernardo says:

    However, not worth it on Windows, simply because Apple puts little to no effort into coding well for our platform. iTunes and the older Safari are proof of that – however gorgeous the latest Safari may be :/

    Btw, isn’t that just the standard webkit inspector? I use it in Chrome.

  2. Tom Schlick says:

    Good Stuff! I’m liking the ability to have extensions for safari.

  3. I downloaded Safari 5 last night and while there are some cool new features I’m finding it incredibly slow, especially compared to Chrome. Anyone else experiencing this.

    I also wrote a short post on tumblr regarding HTML5 support http://bit.ly/b9QIrs. Check it out and tell me what you think

    • Safari 5 is indeed very slow browser, bit faster than Safari 4, but no where near the speed of Opera or Chrome. Also, I tried the SunSpider and other tests, and their promo chart is way off. Safari 5 is faster than Firefox but it’s still behind both Opera and Chrome. After 2 hours with only 3 tabs active, Safari 5 uses way to much memory and it is very unstable to use. Maybe this is only on Windows, but if Apple wants to make a browser for Windows it has to work much more to make that happen. Even with this new version, it’s certain that most Windows users will not be switching to Safari any time soon and will stick to much more reliable solutions like Opera, Chrome or Firefox.

      • nabeel says:

        On apple if you have an intel mac you have core central and other processer defined features which boosts safari and makes run smooth as silk.

    • Suse says:

      Yes. I have the 27 inch iMac. Much slower loading web pages after I downloaded Safari 5. And the refresh is snail-like with the refresh icon in a different place.

  4. Ignas says:

    Comparing to the Chrome it is a little bit slower for sure. But Chrome is more on the speed then on the stability. Also Safari uses big number of RAM sometimes… I don’t know, maybe the cache sometimes stays uncleared… But I like it, because of the inspector improvements, extensions (finally) and the speed of JS. Still for me Chrome seems to run JS faster but is is better then Firefox. To conclude I think I will move to the Safari 5 from Chrome and use the Firefox sometimes in the development, because of the extensions. Of course I will wait for the updates of the Safari and what is more important – I will wait for the extensions for Safari! Nice release from Apple.

    P.S. I should mention also that ClickToFlash plugin works great on this Safari. I like the possibility to run youtube videos on the internal OS player without using flash player. Because I did small experiment with the different browsers playing video in youtube. All of them had twice higher processor load then the Safari playing the video with the quicktime. So this tip could save your battery while you traveling and want to watch some funny stuff in youtube :)

  5. Cody says:

    Hey, I came across this http://safariextensions.tumblr.com/ They’ve got a few extensions up. Worth checking out

  6. Jeff Adams says:

    I WAS a Firefox fanboy for a while, then I tried Chrome and it just “worked”.

    Safari has got it right with teh Javascript speed, thats a big issue (speed) that needs to be addressed by the others in my book.

  7. Josh says:

    I like the inspector changes. The reader thing in pretty neat, but I what happened to the RSS button that used to sit in the address bar? And can I turn off the progress bar there and move it back down to the status bar? Minor things I guess…

  8. vladh says:

    Nice roundup, definitely going to check it out!

  9. Scott Corgan says:

    I was very much looking forward to extensions in Safari 5! I was really bummed when they didn’t announce it at WWDC, but I was patient and it paid off well. Now I am enjoying how Apple had to play catch up!

  10. Great review of Safari 5! It’s great that they’re supporting the new HTML5 elements.

    When I was on Windows, I was a Chrome guy, and I continued to use Chrome on Mac. But this release has got me trying Safari, and I’m liking it so far!

  11. Brian says:

    ok, seriously…where is the audit panel???? i can’t find it anywhere…

  12. simonjs says:

    A few minor things additions I’ve noticed regarding Safari 5

    -Allows custom javascript popups (again) instead of opening new tabs/ fully-chromed windows
    -Now supports CSS3 background gradients and inset box-shadows

  13. Shawn says:

    Unless I’m missing something, I don’t see an Audit Panel in Safari 5.

  14. Brian Egan says:

    I’m not sure the info on the audits panel is correct. The new panel has been added to the WebKit Nightly and Chrome Dev browsers, but according to your screenshot and my installation, I don’t think it made it into Safari 5.

    Am I wrong? Is it just hiding somewhere?

  15. Joffrey says:

    I don’t see the Audits tab… It’s only available in the latest WebKit release, not in Safari 5 (I think).

  16. Shawn says:

    I don’t have it either. According to webkit.org (http://webkit.org/blog/1091/more-web-inspector-updates/), it’s been added to Safari and I see the screenshots but I don’t have it either.

  17. Dan says:

    I don’t see an audits panel in my version of Safari either… Do I have to enable it somehow?

  18. Helen says:

    The reader doesn’t work with HTML5. Hihihi!

  19. Otto Coster says:

    It’s funny that there is Reader now. It solves the problem of the incredible small font sizes on many websites these days, the cluttered sidebars and lets you focus on the content again.

    Seems like a sign to us designers.

  20. L1 says:

    Safari Reader IS based on Readibility.

  21. faviouz says:

    No thanks, I’m sticking with Google Chrome!

    Looking good though.

  22. Good Stuff! I’m liking ;)

  23. dave says:

    Still trying to figure out how Safari 5 detects the “article” part of a Page. They don’t use HTML 5 features to this – yet.

  24. Webomatica says:

    Was already a Safari user, but the one reason for keeping Firefox around is Firebug. Will check out the Web inspector; then perhaps Firefox will only be kept around for browser compatibility…

  25. Chris says:

    FF was my browser of choice because of the web dev tools. Now I like Safari more because it has some good web dev tools (well it has for awhile but just hard to use IMO). Now it’s more friendly and it’s always been better than FF if you are just browsing.

  26. Actually, “Safari Reader” used some code of the Readability Bookmarlet.

    http://twitter.com/chrisdary/status/15672452287

    It’s something they took, modified it and then said they completely made it and revolutionized the industry, like always.

    At least they included the credits/license in the small-letters part :D

  27. I switched to Safari at the beginning of the year for speed, but still found myself opening FF for Firebug use. However, the improvements to Safari’s web inspector may keep me on Safari all the time.

    Already love the reader option and HTML5 support. In fact, two days ago when I launched my site redesign, I was unable to fix an oddity that caused Safari to crash. (Not FF, Opera or even IE, just Safari!) With Safari 5, no more browser crashing. :)

    Cannot wait for the Coda extension!

  28. Patrick says:

    Yawn. I know Chrome and Safari are very close under the hood, so why does it take Apple so long to push out a version of Safari months behind Chrome. And I don’t buy the whole “Apple took its time to polish it”…….it’s slower than Chrome and Chrome doesn’t crash either.

  29. Stephen says:

    “I’m finding it incredibly slow”

    As am I…… Safari 4 that came pre installed on my iMac was very noticeably faster rendering pages… sucks

  30. Khaled says:

    Safari 5 is coll but i still get the uggly message box when some one talk to me in the facebook chat i don’t why anyone have this problem

  31. ShopHTML says:

    Well, a number of these features are already available in Opera 10.53.

    The feature to remove ads is most obviously result of brewing rivalry between Apple and Goolge.

    Good move Apple :)

  32. HDesignsPlus says:

    Thanks for the article, I downloaded it last night, it is fast and fun to use, but can any one tell me where is Web Inspector in PC version of safari5? I could not find most of these feature on my PC.

  33. A reader says:

    Realized that the previous article about Safari wasn’t really, eh, good? ;-)

  34. pixelsoul says:

    “Safari” and “Good” is an oxymoron. Why would anyone use that garbage when you can run Firefox on a Mac….

  35. I wonder how long it will take for this one to be cracked thus compromising the OS.

  36. Thanks for the Safari Update. Definitely intrigued with these new features.

  37. Edward says:

    I still love my Firefox and never had problems with it. I need the web developer toolbar and firebug!

    Although, Safari 5 does seem to be performing quite well too.

  38. OnYX says:

    Step 1 – Install Safari 5
    Step 2 – Look for web development and seo add ons
    Step 3 – Launch Slacker Radio
    Step 4 – Safari Crashes
    Step 5 – Back to Firefox…

  39. Davidmoreen says:

    I should try this, just to give it a fair change. The only problem would be that I am in love with Chrome. Since Safari kept insisting on crashing, 3 times a day I am not to excited to check it out as I would normally be. Although I’ll give the benifit of the doubt, since it employees some really cool new features.

  40. Matt says:

    I installed this, and while websites render very quickly, the chrome itself just tends it self to being very slow. I don’t know why this is, but it really doesn’t bother me as long as I have Chrome available (which works just as well, if not better in my case).

  41. Dan says:

    I love Safari. I dumped Firefox over a year ago – way too slow! Safari 5 is even better. Keep it up Apple!

  42. Through safari update I came to know few very important features in HTML 5 other than just few new tags.

  43. Haab says:

    I like Safari Reader, its really easy and perfect !

  44. hito says:

    Well never too late for the re-open tabs…
    It’s available a long time ago for other browser :)

    What’s the most interesting thing is the safari reader !
    Hope to see this in other browser too ^^

    About performance yea it’s very subjective… there are always saying that’s they are the fastest.
    Opera is fast, chrome as well and safari certainly but i don’t use this browser that much.

    Firefox was my favorite but well time to change. He’s ressource hog and that get on my nerves.
    For now i’m using Chrome & Opera on my macbook pro and Firefox on my PC (much power on my computer so can use firefox ^^)

    Still for development i use firefox.

  45. …is it me or does safari 5 not render google maps very well? i’m having trouble with google maps on safari 5 with the map controls not rendering properly…

  46. aditiarahman says:

    The html element inspector just like the google chrome have, or it is because built from the same engine webkit

  47. arnold says:

    now downloading safari , thanks for the review, web inspector , html 5 support & safari reader is cool , anyway Im still chrome fanboy ;P

  48. Emre says:

    downloading safari :) really been very successful

  49. Evan Byrne says:

    I don’t know about everyone else, but I’m very excited to see websocket support. This opens up a whole world of possibilities including communicating via FTP, Telnet, and other protocols directly from the browser!

  50. Beben says:

    hmmm…its a progress from web developer
    godd good

Comment Page 1 of 21 2

Add a Comment

To add a code snippet to your comment, please wrap your code like so: <pre name="code" class="html">YOUR CODE</pre>. You can replace the class name with "js," "css," "sql," or "php." If there are any "<" or ">" within your code, please search and replace them with: &lt; and &gt; respectively.