Apr 12 2011

Episode 116: Shebang, Shebang

Play

Learn why Facebook, Twitter, and other sites have #! in their URLs.

News and Follow/Ups – 00:37

  • Jade got a new job!
  • Mark shot skeet!
  • Spellr.us is now Checkdog.com
  • Blue lights make you more alert, it’s true!

Geek Tools – 07:55

Webapps – 16:34

  • uFollow – Follow your favorite bloggers
  • Loads.in – See how fast your page loads in various locations

Project Estimation – 23:14

  • What?
    • Some of you may have noticed a lot of URLs on the web with #! in them.
    • The name shebang comes from an inexact contraction of SHArp bang or haSH bang
  • Why?
    • Make the Ajax pages of your site more crawlable to Google and other search engines
      • A browser can execute javascript well, a crawler cannot
      • to make the crawler see what the user sees the server needs to give the crawler an HTML snapshot
      • The current practice
        • Developers make parallel universes, pages for users without javascript and pages with often using progressive enhancement
      • The new way
        • The site adopts the AJAX crawling scheme
        • For each URL that has dynamically produced content, your server provides an HTML snapshot, which is the content a user (with a browser) sees.
        • These will be AJAX urls or urps containing a hash fragment
          • http://faceoffshow.com/index.html#key=value
        • The search engine indexes the HTML snapshot and serves your original Ajax URLs in the results.
        • How do I make these snapshots?
          • Run a headless browser and obtain an html snapshot
          • If much of your content is produced with a server-side technology such as PHP or Ruby, you can use your existing code and only replace the JavaScript portions of your web page with static or server-side created HTML.
          • You can create a static version of your pages offline, as is the current practice.
        • What if I want to do snapshots to my home page that doesnt have #!?
          • <meta name=”fragment” content=”!”>
    • The bang part of it was added by Google and now other search engines are now following suit.
  • Test it out
  • Who is doing this?
    • Facebook
    • Twitter
  • Criticism