• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

When storing TWIKIPREFS in cookies, like twisty does, they are annotated with the path, which is the url up to / including the web. This results in this TWIKIPREF only being in effect at this path (web). That's not always wanted as me, at least, I was expecting them to be not web-specific. Example: the (upcoming) NatSkin uses a twisty to fold away the broadcastmessage and uses twisties in the sidebar navigation. I want them to be remembered while changing webs. So once I have hidden the broadcastmessage I don't want it to pop up again when I move around.

For now I added and explicite path to _writePrefValues in twiki.js:

-       SetCookie(TWIKI_PREF_COOKIE_NAME, cookieString, expiryDate);
+       SetCookie(TWIKI_PREF_COOKIE_NAME, cookieString, expiryDate, '/');

But I am pretty sure that this is wrong as it should pass over a path string that has only the web part of the current path striped off ... which I didn't figure out how to do that, i.e. with hierarchical webs in mind. Anyone with more javascript knowhow?

Or maybe the above is "good enuf".


The path gives you the chance to specify a directory where the cookie is active. So if you want the cookie to be only sent to pages in the directory cgi-bin, set the path to /cgi-bin. Usually the path is set to /, which means the cookie is valid throughout the entire domain. (http://www.quirksmode.org/js/cookies.html)

So cookies are currently stored with a directory path where they shouldn't. The path should indeed be /.


4.1.0 released


Summary cookie prefs are web-specific
ReportedBy TWiki:Main.MichaelDaum

SVN Range TWiki-4.1, Thu, 19 Oct 2006, build 11771
AppliesTo Engine

Priority Urgent
CurrentState Closed

Checkins 11814
TargetRelease minor
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r6 - 2007-01-16 - KennethLavrsen
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback