Always Set Href In Javascripted Links

When using javascript in links onclick event to open windows or perform other navigation related tasks, always set href just like you would if javascript didn’t exist. If javascript is broken, links still work.

<a href="http://example.com/" onclick="doStuff(this.href);">Open</a>

Websites Must Function Without Javascript

Websites need to function without javascript enabled.  AJAX and Web 2.0 are fine tools, but don’t abandon the basics. The ability to interact with a website without javascript means you can easily unit test your website just like you would your other classes and executables. Yes, I’m looking at your ASP.NET 2.0 PostBack Forms.

$ curl -F "username=claco" -F "password=badpass" http://localhost/login/ | grep "login failed"

Always Set Application Name In SqlClient Connection Strings

If you’re using connection strings on the web, set Application Name to the domain name. If you’re using connection strings with an executable, set Application Name to the executable name. If you have to use SQL Profiler to diagnose performance issues, it will be easier to filter out a specific application or web site.

<connectionStrings>
  <add name="LocalSqlServer" connectionString="... Application Name=mywebsite.com;" />
  <add name="LocalSqlServer" connectionString="... Application Name=myapp.exe" />
</connectionStrings>