Skip to main content
Ben Nadel at Scotch On The Rocks (SOTR) 2011 (Edinburgh) with: Mark Drew
Ben Nadel at Scotch On The Rocks (SOTR) 2011 (Edinburgh) with: Mark Drew

ColdFusion Application.cfc OnRequestStart Returns False To Kill Page Load

By
Published in Comments (4)

I just happened upon this totally by accident, but apparently, if the OnRequestStart method of your Application.cfc returns false, none of the other request-events will fire. This leaves you with a rather confusing blank page. I wonder what this is used for. I am used to the return( false ) mentality from Javascript, but I wonder how this translates to ColdFusion.

I suppose that you could have page requests that ONLY need to send IN data, such as with a Session Heart Beat or something. In this case, you could avoid the overhead of OnRequest[End] processing. What is cool though is that you can output to the response buffer from within the OnRequestStart method so you could return data as well. Hmmmm, interesting.

Any one have any thoughts on how this could be leveraged?

Reader Comments

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel