Fixing the mysterious “Element script is missing required attribute src” error

Suppose you're using the W3C validator to validate HTML5. Here's a sample document: <!doctype html> <html lang="en" xml:lang="en"> <head> <meta charset="utf-8" /> <title>Hello</title> <script type="text/javascript" charset="utf-8"> //<![CDATA[ var foo = 1; //]]> </script> </head> <body> </body> </html> Everything looks right, but you get this mysterious error: Line 6, Column 48: Element script is missing required […]

Speed matters

Performance is huge. We think of it as a feature. Speed is the best feature your product can have. Last year Google introduced these performance enhancements to Picasa to make flipping through photos faster, and the usage more than doubled. When a site gets twice as fast, it often gets more than twice as much […]

Handling Rails errors: custom error pages, logging, notification

I wanted to improve error handling In my Rails applications. Specifically, I wanted three things: a custom error page that matched the site's design the errors to appear in the error log (production.log) email notification of server errors Note: these steps are for Rails 2.3.2–2.3.8. Other versions may require different instructions. Custom error page Normally, […]