Cover by Nicholas C. Zakas

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Safari Web Inspector

Safari, as of version 4, provides a profiler in addition to other tools, including a network analyzer, as part of its bundled Web Inspector. Like the Internet Explorer Developer Tools, the Web Inspector profiles native functions and provides an expandable call tree. It also includes a Firebug-like console API with profiling functionality, and a Resource panel for network analysis.

To access the Web Inspector, first make sure that the Develop menu is available. The Develop menu can be enabled by opening Preferences Advanced and checking the “Show Develop menu in menu bar” box. The Web Inspector is then available under Develop Show Web Inspector (or the keyboard shortcut Option-Command-I).

Profiles Panel

Clicking the Profile button brings up the Profile panel (Figure 10-6). Click the Enable Profiling button to enable the Profiles panel. To start profiling, click the Start Profiling button (the dark circle in the lower right). Click Stop Profiling (same button, now red) to stop the profile and show the report.

Note

You can also type Option-Shift-Command-P to start/stop profiling.

Safari Web Inspector Profile panel

Figure 10-6. Safari Web Inspector Profile panel

Safari has emulated Firebug’s JavaScript API (console.profile(), console.time(), etc.) in order to start and stop profiling programmatically. The functionality is the same as Firebug’s, allowing you to name reports and timings for better profile ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required