Skip to content

24 ways to impress your friends

Vote down?

John B

@Geraint & Coolie Law-writers: I didn’t know about that cookie law, and yes, it’s bull. Most websites these days set some cookies as a matter of course, (session cookies or whatever).

@Sripathi: As nice as it would be to rely on WURFL, they’ve gone commercial, so to use it on a business’s website, (I’m not sure about commercial websites), costs US$1500.

@Matt, now for the main part of my comment, I think that you missed an opportunity in your comment about using a redirect header to solve the REST problem. This could probably be used to solve the CDN problem as well, if the flow goes something like this:

1) The request for /images/good-looking.jpg is rewritten to adaptive-images.php by the rewriterule in .htaccess

2) adaptive-images.php does its magic, but instead of returning image data to the browser it sends a 301 or 302 redirect header to that image’s location on a CDN.

3) The CDN then uses the /ai-cache/ folder on your webserver as its origin and serves the properly-resized image, but through the CDN.

That means that there’s an extra whole HTTP request, with DNS lookups and all that, but if the cache-control headers are done right, you may get really good cacheing on the browser, and I’m not sure if the extra DNS lookup is much slower than sending image data using PHP.

As a side-note, it doesn’t seem like textile’s numbered lists are working in the comments.