Ticket #756 (new enhancement)

Opened 2 years ago

Last modified 3 weeks ago

persistent options (without cookies)

Reported by: FND Owned by: JeremyRuston
Priority: major Milestone: 2.7.1
Component: core Version:
Severity: high Keywords:
Cc:

Description (last modified by FND) (diff)

As discussed  here and  here, TiddlyWiki should have a mechanism to "bake" options into the document (instead of or in addition to using cookies).

Attachments

bakedoptions.patch Download (8.6 KB) - added by FND 23 months ago.
Baked Options Patch by JeremyRuston?
bakedoptions2.patch Download (9.5 KB) - added by FND 23 months ago.
Second pass at a patch by JeremyRuston?
bakedoptions3.patch Download (10.1 KB) - added by FND 23 months ago.
Revised patch that packs all the options into a single cookie by JeremyRuston?

Change History

Changed 23 months ago by FND

[comment originally posted by EricShulman?]

see  http://www.TiddlyTools.com/#CookieSaverPlugin for a solution...

The plugin basically hijacks the saveOptionCookie() function so that, in addition to the normal cookie saving behavior, the cookies are automatically written into a tiddler called CookieJar?? as lines of javascript, e.g.:

config.options.chkSomething=true;
config.options.txtWhatever="this is text";
etc.

The CookieJar?? is tagged with systemConfig, so that these settings are automatically applied each time the document is reloaded, effectively providing what I have called "portable cookies" (because they travel with your document, instead of being associated with your browser).

The StorySaverPlugin?? includes support for multiple sets of portable cookies, each associated with a different username so that, when a document containing a CookieJar?? tiddler is shared, MY saved portable cookies will not be applied to THEIR viewing experience.

The plugin also features a customizable "allowCookies()" test function, that provides some control over cookie data privacy by allowing you to block certain cookies from ever being written into the CookieJar?? although they are still being securely stored as "real" cookies in your browser.

Changed 23 months ago by FND

Baked Options Patch by JeremyRuston?

Changed 23 months ago by FND

Second pass at a patch by JeremyRuston?

Changed 23 months ago by FND

Revised patch that packs all the options into a single cookie by JeremyRuston?

Changed 23 months ago by FND

[comments originally posted by JeremyRuston?]

I've uploaded a patch for comment. It's similar to Eric's plugin, but doesn't use a systemConfig tiddler, instead it introduces a new SystemSettings?? shadow tiddler. This is because in some server side environments it will be undesirable to require users to have the permissions to modify a systemConfig tiddler just to make a setting persistent.

I've added a revised patch that now also deletes cookies when they are reset to their default values (see ticket #757). There's some more refactoring and bugfixes too

Changed 21 months ago by FND

  • description modified (diff)

Changed 17 months ago by FND

  • type changed from defect to enhancement
  • milestone changed from 2.5.1 to 2.5.2

Changed 15 months ago by FND

  • severity changed from medium to high

Changed 13 months ago by FND

  • milestone changed from 2.5.3 to 2.5.4

Changed 13 months ago by FND

As an alternative to baking options into the document,  DOM Storage might be used for user-specific preferences in modern browsers.

Changed 10 months ago by FND

  • milestone changed from 2.6 to 2.6.1

This should be revisited via a discussion on the groups. The current patches introduce new concepts - perhaps it would be preferable to go with Eric's approach.

Changed 3 weeks ago by MartinBudden

  • milestone changed from 2.6.2 to 2.7.1

Milestone 2.6.2 deleted

Note: See TracTickets for help on using tickets.