Hacker News new | ask | show | jobs
by cleverjake 5142 days ago
You would need to turn on caching on your query strings in order for this idea to be useful with a cdn (ie, both http://example.org/image.png?size=big and http://example.org/image.png?size=small would need to be cached by the cdn). The issue is if you use some sort of user tracking, or rss feed, or anything that appends unique data to the end of the URL (so http://example.org/image.png?size=small could become something like http://example.org/image.png?size=small&user=19hv839&...). At that point, every single person is getting the uncached version of the site, since their unique url was never cached before. Its not difficult to configure this sort of thing by any stretch of the imagination, but it does add another step.
1 comments

why is your user tracking appending data onto the end of a CDN image? This hypothetical web site makes no sense.
The last time I had to deal with this it was a result of links to a site from an email being attached to the user it was sent to (eg example.com/?email=foo@bar.com). It was not a wonderful example, just a quick one. The moral being by caching query strings you risk needing to parse the ones being passed to ensure there in not unnecessary caching.
This use case seems abusive to me. I don't mind breaking abusive use cases.
Neither did XHTML.

Web Standards work requires you put up with a ton of really stupid things that people have been doing for a long time.

I don't mean abusive in the sense that it's using technology in a way it was not intended to be used. I mean abusive as in actively harmful to the user's interests and privacy.