Posts Tagged ‘code’

Post

Blogger Migration 404

In Blogging on Oct 12 by jason Tagged: , ,

With the migration to Blogger from WordPress, the most effort is going into dealing with post path differences. These differences will cause 404 (missing file) errors if not dealt with correctly. I wanted to be sure that people looking for my older WordPress posts would be appropriately redirected to the correct Blogger address.

My WordPress paths had this structure:
http://jason.ungos.com/2007/09/27/blog-downgrade/

On Blogger, the same post looks like this:
http://jason.ungos.com/2007/09/blog-downgrade.html

Here’s how I’m doing it.

  1. Setup a missing files host.
  2. Redirect visitor to new Blogger path.

Blogger Missing Files Host
The missing files host option was probably created to deal mostly with broken images or downloadable documents. I’ve expanded its use a bit by creating a custom 404 page that has some redirecting functionality.

The custom 404 page is a PHP script that:

  • Checks the URI
  • Determines what kind of document is being requested (post, tag search, etc.)
  • Semi-intelligently determines the new URI, and
  • Redirects the visitor.

Here’s what I have so far:

It’s neither elegant nor robust, but it achieves my main goal of dealing with old post links. I plan to develop this a little more to accommodate changed page names, broken images, and feeds.

Anything else I should add?

Post

DOCTYPE: The site killer.

In Miscellaneous on Nov 05 by jason Tagged:

Did you know that bad DOCTYPEs are killing good websites. Use the right DOCTYPE to fix your site.

Nowadays, just about everyone knows something about HTML–especially my wife’s cousin’s uncle’s third son, a.k.a. Little Johnny. But do you know about one of the most common HTML errors? It’s an improperly written DOCTYPE tag.

Jeffrey Zeldman has a short article that will help you to Fix Your Site With the Right DOCTYPE!

Post

CSS Overboard

In Miscellaneous on Nov 02 by jason Tagged:

It’s been said many times that CSS is great for markup (vs. layout). This brings up a good point about going overboard with CSS. And I’ve done it many times…

You have a certain design in your head and start applying new divs, spans, and class to fit that look. Although CSS is capable of doing lots of neat stuff, adding new tags or classes can quickly nullify the efficiencies of CSS.

Minimize the number of custom classes by sticking with standard HTML tags. It’s not only good practice, but you also can quickly stay compatible with screen readers and cell phones. You will also provide nice structured content for SEO and non-CSS capable browsers.