Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

cfcookie not working (CF9)

Contributor ,
Nov 23, 2011 Nov 23, 2011

I use this line of CF code to set new cookies :

<cfcookie name="PLARTS_MAIL_USERNAME" value="#trim(form.username)#" expires="410">

And i cannot see my cookie in FireFox , or readding it with Javascript,

or using CF read with : <cfparam name="cookie.PLARTS_MAIL_USERNAME" type="string" default="" />

It always return "blanc" , not existing.

(I can see other cookies from other Sites).

Any idea ? any help thanks.

TOPICS
Advanced techniques
8.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 28, 2011 Nov 28, 2011

plarts wrote:

Then I found it :  a CFFLUSH

I have a <cfflush interval=10>

with it, I loose the cookies, if I take it out

I keep the cookies.

Well done! (I am embarrassed I didn't think of cfflush when you dismissed cflocation)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 29, 2011 Nov 29, 2011

Better, but,

how to replace a CFFLUSH ?

now I have blanc page for 10secondes before a screen display.

(this is a CFPOP returning all mails, time depending of number of mails)

Any suggestion.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 29, 2011 Nov 29, 2011

A common model that many developers use in these cases is to change from a completely CF server-side process to an AJAX-based hybrid of HTML, JavaScript and ColdFusion.

i.e.

1) Your user screen performs an asynchronous request to the CF page responsible for the mail POP using JavaScript

2) While the request is running, the user screen displays a loading message/graphic

3) Behind the scenes, your CF page performs the mail POP and returns the data (HTML, JSON, WDDX, etc)

4) Your user screen receives the response via the AJAX success handler and displays the information to the user.

jQuery makes this whole thing very easy to do, but there are other JavaScript libraries and methods that accomplish the same thing.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 29, 2011 Nov 29, 2011
LATEST

Thanks, I will try that way.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources