Skip to main content
Participant
October 23, 2007
Question

Session instead of cookies?

  • October 23, 2007
  • 1 reply
  • 347 views
I have a real estate site with which has the ability to search all MLS listings through coldfusion, however I have a problem because the MLS people are making it so I have to iframe the coldfusion page from my main site. This is causing me a major headache because they use cookies to track the queries and since it is iframe'd IE6 and IE7 consider them third party cookies and block them (I have attempted to get them to implement P3P headers with no luck.).

I have been doing research on this issue and came across session variables, is this a solution or am I chasing my tail? Can someone help me out with this, I can do basic html and CF but this seems to be beyond my skill level.

For those of you interested, here is my error:

Attribute validation error for tag cfoutput.
The value of the attribute query, which is currently QParams, is invalid.

The error occurred in E:\Inetpub\wwwroot\SarahMacy\cgi-bin\GetPageTb.cfm: line 44

42 : </TR>
43 : <TR>
44 : <TD><cfoutput query="QParams"><span class="style1"><font face="Arial, Helvetica, sans-serif">
45 : <cfif QParams.RecordCount gt 0>
46 : <cfif Stories is not 'Any'>


This topic has been closed for replies.

1 reply

October 23, 2007
Pass a CFID & CFTOKEN with _every_ single link that you create within your application code and you can use Session variables without cookies enabled.

I assume that there is a landing page for these users... at that point, the ColdFusion server will issue a unique CFID & CFTOKEN for that user. Without cookies to store the CFID and CFTOKEN in (due to the IFRAME), ColdFusion will issue a new CFID and CFTOKEN with every request from that user. If you pass it in the URL, then ColdFusion will recognise that and use them instead of looking for a cookie with them (assuming you don't have J2EE session vars enabled in the CF Admin, but that is another story...)

Have a look at the URLSessionFormat at http://livedocs.adobe.com/coldfusion/7/htmldocs/00000660.htm#139074 which may help in keeping the code clean, but to be honest give it a try first as I am not sure if it will fit the description you give.

If you have an existing application that is pretty big, you may have a big task on your hands. Doing the above will let you use CF Session vars without cookies.

BTW your error doesn't see to have anything to do with your problem unless the QParams is stored in the session.
blah411Author
Participant
October 24, 2007
Thank you, that worked perfect.