Live data from Hacker News

HTTP Headers For Fun & Profit

loopj.com

21–30 of 53 posts

Re: HTTP Headers For Fun & Profit

#23
post #12

Is this not a terrible waste of bandwidth though ? At about 10 bytes per header (on the low end..) and say 100 million requests per day, that amounts to 1Gb of outbound bandwidth, if you count inbound bandwidth then that comes to 2gb in total. Not to mention the cumulative time spent by users downloading those bytes, thereby delaying resource display. Okay, I see that I sucked the fun out of it :P

Yeah it is a waste, but then so is sending CSS and Javascript that hasn't been minified. Or having multiple CSS / Javascript files when they could be consolidated. Or having long variable / class names in CSS / Javascript. Or constantly referring to Javascript as Javascript and not JS.

At some point you have to question whether you're being too stingy with bandwidth. Particularly when easter eggs like this could potentially bring you a few new visitors from the free advertising that happens when your site is discussed on blogs and forums like these.

But if nothing else; I think fun should be encouraged. After all, that's what Wozniak set out to do when he co-founded Apple :P

Re: HTTP Headers For Fun & Profit

#25
post #12

Is this not a terrible waste of bandwidth though ? At about 10 bytes per header (on the low end..) and say 100 million requests per day, that amounts to 1Gb of outbound bandwidth, if you count inbound bandwidth then that comes to 2gb in total. Not to mention the cumulative time spent by users downloading those bytes, thereby delaying resource display. Okay, I see that I sucked the fun out of it :P

Maybe they're just sending the headers for user-agent "curl"?

Nope, tried with Chrome latest and Firefox latest. I wondered the same.

Re: HTTP Headers For Fun & Profit

#27
post #12

Is this not a terrible waste of bandwidth though ? At about 10 bytes per header (on the low end..) and say 100 million requests per day, that amounts to 1Gb of outbound bandwidth, if you count inbound bandwidth then that comes to 2gb in total. Not to mention the cumulative time spent by users downloading those bytes, thereby delaying resource display. Okay, I see that I sucked the fun out of it :P

I wouldn't say a terrible waste of bandwidth given the novelty trade off it provides to people like us.

Besides, there's more wasted bandwidth from dubious user generated content per second floating around the internet at any second.

If you have 100 million requests per day, then you definitely have bigger problems such as your monthly CDN bill. :)

Re: HTTP Headers For Fun & Profit

#28
post #20

I know Wordpress.org sends a header called X-Hacker or something, telling people who see the header to look at their jobs page and tell them about the header.

It's not that hard to check and it seems they don't. But they have this other X-nc header:

  $ curl -I wordpress.org
  HTTP/1.1 200 OK
  Server: nginx
  Date: Fri, 07 Dec 2012 12:15:43 GMT
  Content-Type: text/html; charset=utf-8
  Connection: close
  Vary: Accept-Encoding
  X-nc: HIT luv 139

Re: HTTP Headers For Fun & Profit

#29
post #20

I know Wordpress.org sends a header called X-Hacker or something, telling people who see the header to look at their jobs page and tell them about the header.

    # curl -I http://automattic.com
    HTTP/1.1 200 OK
    Server: nginx
    Date: Fri, 07 Dec 2012 12:53:44 GMT
    Content-Type: text/html; charset=UTF-8
    Connection: keep-alive
    Vary: Accept-Encoding
    Last-Modified: Fri, 07 Dec 2012 12:51:57 GMT
    Cache-Control: max-age=193, must-revalidate
    X-nananana: Batcache
    Vary: Cookie
    X-hacker: If you're reading this, you should visit automattic.com/jobs and apply to join the fun, mention this header.
    X-Pingback: http://automattic.com/xmlrpc.php
    Link: ; rel=shortlink
Post reply on HN