Search

5/27/2009

204 No Content / phpied.com

204 No Content / phpied.com

Now (after we relax a bit)... instead of having your server send a blank GIF, however small, can you just send.. nothing? Yep, you can. Your server can respond with a "204 No content" header. Cool, eh, especially when you want to squeeze every bit of network traffic?

Another application of 204s I was thinking could be favicons. If you don't want to deal with favicons, but you don't want to respond with a 404 Not Found either, you can just configure Apache to send 204 to favicon requests. Could be useful when your application generates subdomains for your users, since the browser will request the favicon from each subdomian (unless you have a link-ed favicon).

沒有留言: