Web Standards

Posted:

This post was originally on a blog I started for creating web applications. This post goes into using web standards and best practices.

Check that GET and POST Requests are Used Properly

GET request should be for requesting information.

POST requests should be for sending information.

A GET request should not change the object that is being requests.

Validate your HTML and CSS

Write your XHTML or HTML and CSS according to the W3C specifications and make sure they validate.

Avoid browser quirks modes by doing this.

Use 301 and 302 Redirects Correctly

According to Bigoak Inc:

All three major search engines handle 301 redirects the same, that is to say they ignore the original URL and instead index the destination URL.

The three major engines handle 302 redirects very differently, and because of this 302s are typically not recommended.

Best practice is to use 301 redirects (which are permanent and are usually cached by the browser). For temporary moves, use 302 redirects.

Force IE to Use Unicode for Parameters

If you have ever seen utf8=✓ in the parameter listing of a url, it's in order to force Internet Explorer (5, 6, 7 and 8) to encode its parameters as unicode.