Archive for January, 2009

Controlling Browser Content Expiration in ASP.NET

Correctly controlling content expiration is a tricky thing. You need to balance two goals: getting the browser to cache as much as possible to reduce page load times and bandwidth, versus not showing the user stale content. In this article I’ll cover a simple technique (with code) to solve this issue in ASP.NET for stylesheets [...]

How-To: Delete a cookie in ASP.NET

Deleting a cookie from ASP.NET is something that trips up a lot of people (myself included when I first started ASP.NET coding). Here’s how:

Sniff Out That Smelly Code

As time goes by, things go wrong with any body of code: we get lazy, bad developers contribute code, the original clean architecture gets forgotten, and so forth. Some bad code is easy to spot: it simply “smells” – once you see it, you know it’s bad.
Refactoring this sort of code to remove the smell [...]