Ben Forta

Blog

April 26, 2001

Lock SESSION Variable Access

By now most ColdFusion developers know that access to shared variables must be locked, but many developers mistakenly think that SESSION variables need no locking if frames are not being used. The truth is, SESSION variables are usually accessed by a single thread at a time, but if users hit...

April 25, 2001

Pick Your Favorite Folder

If you are working on an application that uses several directories that you regularly need to access (code, images, Custom Tags, etc), then take a look at ColdFusion Studio's "Favorite Folders" feature which lets you jump to specific directories by selecting them from a popup list. To add a...

April 24, 2001

Debug Logs

is used to execute Java Servlets from within ColdFusion. features a DEBUG attribute which can be used to log debug information. If you use this feature remember that DEBUG logs to the JRun log files, not the ColdFusion log files. (Applies to: ColdFusion 4.5 (or later))

April 23, 2001

Is It An Index Or An Item?

Having a hard time remembering when to use INDEX and when to use ITEM in your loops? As you have probably discovered, these attributes are not interchangeable, you must use the right one for the loop being created. ITEM is only used when looping over a COLLECTION, other loops (index and list) use...

April 22, 2001

Resizing Arrays

The ArrayResize() function is used to change the size of an array, making it bigger or smaller. But if you are thinking that making an array smaller will free up memory, think again. While arrays may be shrunk, any memory they used will not be freed up until the variable (the array) ceases to...

April 21, 2001

More Than 100 Cached Queries

ColdFusion 4 introduced query caching, a mechanism by which queries may be reused to prevent unnecessary database access. But to prevent this feature from chewing up uncontrolled amounts of memory, it was limited to 100 queries only. Need to cache more queries than that? Actually, despite what the...

April 20, 2001

Trim Dynamic URL Parameters

If you ever build URL parameters dynamically (using variables or database columns) make sure to use Trim() to trim any leading or trailing spaces from those values. URL length is limited, and many browsers (particularly older ones) have problems with long query strings. Any saved space helps....

April 19, 2001

Eliminate Unnecessary Locks

Access to data in shared scopes must be locked to prevent data and memory corruption. But if you need to access the same shared scope variable over and over, don't lock it every time. Instead, lock it once and make a local copy (in either the VARIABLES or REQUEST scopes) and then read the local...

April 18, 2001

Sending Cookies Securely

Cookies created using are usually sent to the browser unencrypted. To send cookies encrypted use the SECURE="YES" attribute. But two things to note. Firstly, if the browser does not support SLL the cookies will not be sen. And secondly, this attribute only effects the cookie transmission, the...

April 17, 2001

and Simultaneous Requests

If is failing with connection errors, check to see that simultaneous requests (in the ColdFusion Administrator) is set to a value greater than 1. uses internally to make a local call to execute the page and grab the results. Obviously, if simultaneous requests is set to 1, ColdFusion will not be...

Page 467 of 489 (4885 posts)