Articles tagged web development
Thursday, 30 July, 2009 — web development
I’m a jQuery-fan and I recently wrote some forms for CrazyLikeThat using jQuery and AJAX. The goal was to use a Rails application I wrote as a service.
I hit a few roadblocks, though and in solving them, learned some things:
- IE8 has three rendering modes, and there are implications for how to interact with the DOM based on which mode you’re in.
Apache Server Side Include directives for local web development
Thursday, 12 March, 2009 — web development
I remembered a few years back to some time at sacbee.com when one of the designers demonstrated Apache’s server side includes weren’t limited to including a page snippet or executing a CGI script, but included conditional logic. That’s precisely what I was after in this case.
So, what does this look like? My Apache directive is very simple. You’ll need both mod_include and mod_env enabled.
Then, on my pages, I do something like this:
When that NoAds environment variable is set, that file won’t be included. In production, it will be. My next approach on this will be to use different versions of jQuery based on environment. I can use a developer friendly version for my local development and use Google’s hosted jQuery in production. What’s really nice about this is with Apache 2.2’s chained handlers, I can use the same logic regardless of whatever’s building the page first, be it Rails, Template Toolkit or PHP.