Follow Redirects with cURL
I love playing around with cURL. There's something about loading websites via command line that makes me feel like some type of smug hacker, just like tweeting from command line does.
I recently cURL'd the Google homepage and saw the following:
#<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
#The document has moved
I found it weird that Google does the initial redirect but I still want to get the source of the Google homepage with cURL, as with any site that may do a redirect without you noticing. Luckily it's just a single flag:
curl -L google.com
#<!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="en">...
-L flag instructs cURL to follow any redirect so that you reach the eventual endpoint. Those tiny redirects are just noise anyways, right?
Kids these days, I tell ya. All they care about is the technology. The video games. The bottled water. Oh, and the texting, always the texting. Back in my day, all we had was...OK, I had all of these things too. But I still don't get...
I've always seen Digg as a very progressive website. Digg uses experimental, ajaxified methods for comments and mission-critical functions. One nice touch Digg has added to their website is their hover share widget. Here's how to implement that functionality on your site...
One detail we sometimes forget when considering print for websites is that the user cannot see the URLs of links when the page prints. While showing link URLs isn't always important, some websites could greatly benefit from doing so. This tutorial will show you...