Ever since I took control of my own DNS, I've been doing a lot of redirecting, bouncing people around to temporary sites, or adding special subdomains. (My host, dnsmadeeasy.com has a feature called "HTTP redirection records" that lets me serve the redirect straight from DNS, which is convenient.)
One mistake I've made a few times, though, is using a 301 (Moved Permanently) when I should use a 302 ("Found" a/k/a Moved Temporarily). The problem with this is that because 301's are permanent, browsers are allowed to cache them. Which means that once you establish a 301, it can be very hard to undo it, if it's cached by users' browsers. 302s, meanwhile, are loose and flexible; the browser will re-request the original URI on every request, and if the redirect has been removed, or changed, the browser will detect that.
So use 301s with care. Start with a 302, and make sure it works -- and make sure you really really want this to be permanent -- before locking it down as a 301.
Everyone wishes they could write a note to their past self. Well, it's not going to happen. But sometimes a note to the future can come in handy, too. So here are some things that I want my future self to know. You're welcome, future-Dave.
Monday, May 21, 2012
Tuesday, May 15, 2012
Dave's Simple Rules
- Engage the user. Respect the user. Create an environment for collaborative discovery.
- Complexity ≠ Sophistication. Seek elegance.
- Find a question. Find the answer. Share the answer. Find another question.
- Be excellent today.
Subscribe to:
Posts (Atom)