ColdFusion Blog http://coldfusion.tcs.de/ Everything ColdFusion. Adobe, please fix ColdFusion SerializeJSON() http://coldfusion.tcs.de/adobe-please-fix-coldfusion-serializejson <p><span style="text-decoration: underline;">Update 1 (July 29th 2010):</span> Adobe has officially accepted this as a bug and targets a fix for 9.0.1 (Hotfix).&nbsp;</p> <p><strong>ColdFusion 9.0.1 is essentially disqualified to be used with NoSQL datastores where JSON is involved.</strong></p> <p>We have used ColdFusion since 3.0 in 1998 upgrading to 4.0, 5.0, 6.1, 7.0, 8.0 and 9.0.<br />We did this upgrade for our servers and for even more of our customers servers that use our software.<br /> Tue, 27 Jul 2010 00:00:00 GMT FIX: history.back() not working in Google Chrome, Safari and Webkit http://coldfusion.tcs.de/fix-historyback-not-working-in-google-chrome-safari-and-webkit <p>The standard <strong>history.back()</strong> does not work in Chrome and probably Safari and other Webkit browsers.</p> <p>It took me a while to figure this out.</p> <p>So this is how you make it work across all browsers:</p><!--more--><p>Instead of</p> <p><textarea class="prettyprint">&lt;a href="javascript:history.back();"&gt;back&lt;/a&gt;</textarea> </p> <p>Just use</p> <p><textarea class="prettyprint">&lt;a href="javascript:history.go(-1);"&gt;back&lt;/a&gt;</textarea> </p> Thu, 15 Jul 2010 00:00:00 GMT Load a different CSS in IE6 and IE7: CSS Hack / if statement http://coldfusion.tcs.de/load-a-different-css-in-ie6-and-ie7-css-hack--if-statement <p>We are using CSS files with embedded images on some sites. Have a look at <a href="http://wiki.github.com/nzakas/cssembed/" target="_blank">Nicholas C. Zakas excellent cssembed utility</a>.</p> <p><strong>The good thing:</strong> Just after loading the CSS most of the images needed to display the site are at the client. No longer does a new visitor request dozens of small 1KB PNG files for backgrounds, bullets and tiny icons. It's all right there in the CSS. This really pays of when you targe Thu, 08 Jul 2010 00:00:00 GMT Javascript: Near perfect Email validation / check routine as string prototype http://coldfusion.tcs.de/javascript-near-perfect-email-validation--check-routine-as-string-prototype <p>Based on <a href="http://fightingforalostcause.net/misc/2006/compare-email-regex.php">this post</a> and <a href="http://www.mi-ange.net/blog/msg.php?id=79&amp;lng=en">that post</a> i created a simple string prototype to evaluate emails via one Javascript RegEx in Javascript.</p> <p>In the past i used a complex check that also had a list of all valid TLDs integrated. Now every time a new TLD (like .biz or .mobi) was introduced i had to <strong>update the email check routine</strong>. Too much Sun, 30 May 2010 00:00:00 GMT Coldfusion: IE Cache problem with repeating Ajax Requests http://coldfusion.tcs.de/coldfusion-ie-cache-problem-with-repeating-ajax-requests <p>If you use Coldfusion to create Javascript endpoints - e.g. for Ajax Requests, then everything might work just fine at first sight. </p> <p>Later some users might report that in Internet Explorer (6.0, 7.0 and 8.0) content that you refresh via Ajax requests might not get updated.</p> <p><strong>Here's why:</strong></p><!--more--><p>Suppose you have a HTML page that contains an Ajax Request to a .cfm file to get the content of the users inbox. The .cfm file returns a JSON string with all ite Tue, 25 May 2010 00:00:00 GMT Access Amazon S3 buckets with your own CNAME domain http://coldfusion.tcs.de/access-amazon-s3-buckets-with-your-own-cname-domain <p>Amazon S3 is awesome for scalable hosting especially for images, videos and other assets.</p> <p> If you still want to show your visitors your own domain instead of the s3.amazonaws.com domain for your assets then you can setup a CNAME record for your domain pointing to the S3 bucket.</p><!--more--><p>Here's how to do this:</p> <ul> <li>Create a bucket in S3 and name it like your CNAME domain name.<br /> For example: images.yourdomain.com<br /> <br /> Yes, your S3 buckets name should be t Tue, 04 May 2010 00:00:00 GMT Delete / Clear Google Analytics cookies with Javascript http://coldfusion.tcs.de/delete--clear-google-analytics-cookies-with-javascript <p>So we used Google Analytics on many of our projects - but no longer do.</p> <p>Still most of our visitors have those lifetime cookies <strong>__utma</strong> and <strong>__utmz</strong> set and send those to our servers with every request.</p> <p>A small script - a generic script that clears cookies via javascript - that we leave in place for a few weeks should clear these cookies for 90%+ of our users and leaves them and us with less persistent cookies. </p> <p>Here's the small javascript th Tue, 04 May 2010 00:00:00 GMT Prevent Internet Explorer (IE) and other browser caching in ColdFusion http://coldfusion.tcs.de/prevent-internet-explorer-ie-and-other-browser-caching-in-coldfusion <p>Just a quick note - as i keep forgeting this.</p> <p>With its standard setting Internet Explorer will fetch the same URL from its cache if called a second time within the same browser session. That is if the URL had no special Headers set.</p> <p>To prevent IE and other browsers from caching a URL simply add this to your ColdFusion pages:</p> <p><textarea class="prettyprint">&lt;cfheader name="cache-control" value="no-cache, no-store, must-revalidate"&gt; &lt;cfheader name="expires" value="- Wed, 14 Apr 2010 00:00:00 GMT VMWare and Ubuntu: ACPI: I/O resource piix4_smbus error on boot http://coldfusion.tcs.de/vmware-ubuntu-acpi-piix4_smbus-error <p>After installing a brand new Ubuntu 9.10 64bit on VMWare i got the message:</p> <p><strong>ACPI: I/O resource piix4_smbus [0x1040-0x1047] conflicts with ACPI region SMB_ [0x1040-0x104b]</strong></p> <p>Resolved this by adding </p> <p><strong>blacklist i2c_piix4</strong></p> <p>at the end of /etc/modprobe.d/blacklist.conf</p> <p>&nbsp;</p> Fri, 26 Feb 2010 00:00:00 GMT Coldfusion: Amazon S3 upload via Form POST example http://coldfusion.tcs.de/coldfusion-amazon-s3-upload-via-form-post-example <p>Amazon S3 is a great way to store files that need to be exposed on the web. Every uploaded file can be accessible to the public or accessible to authorized users only via a clever system of expiring signatures.</p> <p>Joe Danziger wrote an <a href="http://amazons3.riaforge.org/" target="_blank">excellent CFC</a> to do all kinds of operations via the S3 REST interface.</p> <p>The only missing part is the new way Amazon is offering to upload files without the need to first buffer them on your o Tue, 23 Feb 2010 00:00:00 GMT