Skip to main content
Inspiring
June 1, 2010
Answered

how to clear URL.whatever ?

  • June 1, 2010
  • 1 reply
  • 479 views

I have a page which does this

<cfif isdefinted ("URL.addMerch")>

    do something

</cfif>

I want to then clear this URL.addMerch, so if the user clicks refresh, the above condition won't be true

How do I do it ? eg.

<cfset "URL.addMerch" = false>

This topic has been closed for replies.
Correct answer ilssac

You don't.

The URL comes form the browser.  If the browser makes a request that has url key-value pairs, the web server is going to parse that querystring and give it to ColdFusion which will populate the url structure for easy access to it.

If you want to track if a user and already requested a page, you will have to build that feature.  As simple method would be to place a flag, or some other type of data, into the session scope that indicates the page has been visited.  Then make the desired decisions based on that value.

1 reply

ilssac
ilssacCorrect answer
Inspiring
June 1, 2010

You don't.

The URL comes form the browser.  If the browser makes a request that has url key-value pairs, the web server is going to parse that querystring and give it to ColdFusion which will populate the url structure for easy access to it.

If you want to track if a user and already requested a page, you will have to build that feature.  As simple method would be to place a flag, or some other type of data, into the session scope that indicates the page has been visited.  Then make the desired decisions based on that value.

Inspiring
June 1, 2010

ah, of course

I'll flag it up, so it can't be repeated immediately

thanks Ian