Ben Forta

Blog

March 22, 2001

When SESSION Variables Time Out Too Soon

ColdFusion SESSION variables time-out - this is part of their design, after a period of inactivity they disappear. The time-out interval is specified when SESSION state management is enabled - in the tag. But sometimes SESSION variables will time-out quicker than they are supposed to. Why is this?...

March 21, 2001

CALLER Scope and Nested Custom Tags

ColdFusion Custom Tags may be nested - that is, Custom Tags may call Custom Tags that may call Custom tags that may call … you get the picture. When nesting Custom Tags remember that the CALLER scope always refers to a Custom Tag's caller, not the top level page. If you need to pass data up...

March 20, 2001

Using Logical Paths

As a rule, applications should use relative paths wherever possible. Absolute paths can be problematic if files or directory locations change. If you need to refer to absolute paths (for example, in ), set up a logical path in the ColdFusion Administrator (the Mappings page) and use that in your...

March 19, 2001

CLIENT or SESSION?

ColdFusion supports two type of variables both of which facilitate the use of persistent data - CLIENT and SESSION. And although both are enabled using , and both use CFID and CFToken for client identification, they are actually very different. SESSION variables are stored in memory, CLIENT...

March 18, 2001

Cookieless Session Variables

ColdFusion SESSION variables use two cookies (CFID and CFTOKEN) to identity the client browser - all SESSION variables are stored on the server, but the two cookies are needed to know which set of variables belongs to whom. But what if you can't (or won't) use cookies? You can still use SESSION...

March 17, 2001

Portable Yet Operating System Specific

Most ColdFusion code that you write should be fully portable (assuming you pay attention to things like case-sensitivity in file names and paths). But what if you need to write operating system specific code (perhaps to use COM, or to execute different statements on Windows and Linux)? Is it...

March 16, 2001

Create an Application.cfm - Always

Application.cfm file is a special ColdFusion file - if present it is automatically included and processed with every requested page. ColdFusion applications do not need this file, but you should always create one in your application's root directory even if you don't intend to use it. Why? Because...

March 15, 2001

Flexible Date Data Entry

Be more flexible when prompting users for dates. Instead of requiring rigid formats, allow users to enter dates as strings and then use the ParseDateTime() function to parse them. ParseDateTime() takes a string containing a date (supporting all sorts of formats) and returns a valid date time object...

March 14, 2001

Safely Generating XML Data

Generating XML data? Your text may contain characters that may not be used within XML text (for example, the less than symbol, the ampersand, and quotes). These characters must be escaped so that they do not interfere with XML data processing. To be safe, any and all data within an XML document...

March 13, 2001

Inline Mathematical Operations

ColdFusion variables may be incremented or decremented using simple assignments, for example, . But tag based assignments can't be used within functions (you can't call a tag inside a function call), and so ColdFusion also provides two functions that perform the same operations using function...

Page 471 of 489 (4890 posts)