Opened 14 years ago
Closed 14 years ago
#5585 closed enhancement (fixed)
Proposed change to Persist for dijits
Reported by: | tk | Owned by: | tk |
---|---|---|---|
Priority: | high | Milestone: | 1.2 |
Component: | Dijit | Version: | 1.0 |
Keywords: | persist, tree, splitcontainer | Cc: | |
Blocked By: | Blocking: |
Description
Instead of persist: true/false, I propose we modify persist to be a numeric value so we can use {expire: persist} in dojo.cookie() to specify longer cookie expiration dates. This could be done several way....
my suggestion would basicalyl be to treat anything !== false or possible >-1 since 0 is a valid option (session cookie) as true...
Comments/suggestions?
Change History (10)
comment:1 Changed 14 years ago by
comment:3 Changed 14 years ago by
comment:4 follow-up: 5 Changed 14 years ago by
I would say not support dates.... how many websites say "your cookie will expire on X day (unless they are telling you what X days from now is)
this would mean false, 0+ are the only values we care about, and you can say true==0 for boolean compatability if oyu really want to.
in this case, false means no persist 0 == sessions (default current only behavior)
0 == X days
Off to bed, just wanted to put this in a safe spot for others to ref later.
comment:5 Changed 14 years ago by
Milestone: | → 1.2 |
---|
Replying to tk:
this would mean false, 0+ are the only values we care about, and you can say true==0 for boolean compatability if oyu really want to.
This would still imply mixed types, which the parser doesn't handle well, plus it complicates the API. Bill has suggested we just go with boolean and have some global setting that lets the user customize the persist behavior.
comment:6 Changed 14 years ago by
Right, and also perhaps we should change the default behavior so that persist="true" on a widget persists forever, not just for the session. That's a simple change that could be added to 1.1 to partly address this bug.
comment:7 Changed 14 years ago by
Milestone: | 1.2 → 1.1 |
---|
moving back to 1.1 so we don't forget that part
comment:8 Changed 14 years ago by
Owner: | set to tk |
---|
please change the default to 365 days for 1.1, but don't change widget APIs.
comment:9 Changed 14 years ago by
Milestone: | 1.1 → 1.2 |
---|
comment:10 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
it would be nice if we were consistent with dojo.cookie. dojo.cookie seems to use days for props.expire...