Getting Web Page Headers with Safari and Curl
See what's running underneath
Posted at Aug 14 2008 18:40  Comments 0 / Trackbacks 0

Some times you look at a page, it looks interesting and you wonder what's behind that page. Looking at the HTML headers often reveals interesting things about the site like what web server they are using, maybe what languges (php, python, ruby) and even more.

Safari doesn't have a built in way to look at those headers so here is a little applescript that does the trick. It depends on curl but Mac OS X ships with curl so this shouldn't be a problem.

tell application "Safari" to set theURL to URL of document 1
set cmd to "curl -I  " & theURL
do shell script cmd
display dialog result