GeekFindr: Safari’s Web Inspector
As Firefox begins to crush my soul on a regular basis, I find myself in Safari more often (which isn’t too often, but enough) and so I’m learning more about this strange beast these days. It still offers no replacement for web developer and tamper data but I recently discovered the “Inspect Element” feature that’s pretty sweet. I found it as an aside in this post about more Safari debugging tools.
First you need to follow the directions from that post - in a terminal window bust out this commandline:
defaults write com.apple.Safari IncludeDebugMenu 1
Start a fresh Safari (quit first if you need to!). Then when you restart first you’ll see a new “Debug” menu item - this has all kinds of stuff that seem quite low level and filled with things I could not decipher in the few minutes I spent perusing them (accept for the User Agent setter, that’s pretty nice). The key bit shows up when you right click on a given web page, you’ll see a new element in the contextual menu that pops up “Inspect Element”.
This gives you a window that shows you all the html, css, images, scripts and other bits that are to be found on the page. In Firefox lingo, it’s like a “view page info” on ‘roids (although it doesn’t provide you the kick ass form information that page info shows you). The key awesomeness is in the Documents drop down - click on your main html and you’ll get a view of the source. Then above that middle pane click on the tabby section (as opposed to the straight lines) you’ll get a better break down (DOM style) of the elements. There you can navigate to the precise html you are looking for and Safari will highlight each part that you click on.
In the right pane it will show you the css styles associated with whatever you are looking for. Very nicely it takes an XRAY like block that shows you how it interprets the block model of the element you’ve viewing (in the metrics drop down).
It is no replacement for Firefox’s development and page inspection tools, but it does offer a nice supplement to them as well as serving in a pinch sometimes if I find myself in Safari. Is there anything else I’m missing in Safari that will improve my quality of life?








December 16th, 2007 at 5:39 pm
SafariBlock (recently open-sourced and updated for leopard) can be found here:
http://code.google.com/p/safariblock/
Also, SAFT is pretty much a must-have. That can be found here:
http://haoli.dnsalias.com/index.html
Neither of these is a developer-ey type thing but makes life a bit easier from the end-user browser side of things.
I too have been finding myself more and more in Safari lately. Firefox seems to have gotten very unstable for me. I was thinking it was just me…what kind of issues are you having?
December 16th, 2007 at 6:11 pm
Michael, what’s the difference between safariblock and SAFT? They both seem to be ad blockers - do they tag team better than they do individually? Or did I misunderstand SAFT?
My problems with Firefox all are related to how sluggish it gets over time. After a couple days (or sometimes much less) it just bogs down - opening a new browser requires many, many seconds before you can even start typing in the URL bar, page rendering is slow, etc… Eventually it either crashes or I have to force quit it (because a regular quit never works for me anymore). Sucks, because that’s pretty much my only complaint - if it just stayed snappy (or as snappy as FF ever is) the whole time, I’d be a happy camper. Know?
You having different issues?
December 17th, 2007 at 1:46 pm
I hate to bring the argument up again…. but in regards to your firefox performance, i have found that adblocking significantly improves its usability.
The truth is that even slashdot is host to animated or interactive flash ads. I dont know if its a memory leak or what, but a few dozen tabs open with a flash ad or two (and animated gifs) in each over a few days can really add up.
December 17th, 2007 at 2:09 pm
Huh, you raise an interesting point. I may give it a shot and see how the ol’ FF handles an adless world… if it gives me a few extra days at least, it’ll be worth it.