Ticket #756 (closed enhancement: fixed)

Opened 5 years ago

Last modified 3 years ago

persistent options (without cookies)

Reported by: FND Owned by: MartinBudden
Priority: major Milestone: 2.6.2
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 5 years ago.
Baked Options Patch by JeremyRuston?
bakedoptions2.patch Download (9.5 KB) - added by FND 5 years ago.
Second pass at a patch by JeremyRuston?
bakedoptions3.patch Download (10.1 KB) - added by FND 5 years ago.
Revised patch that packs all the options into a single cookie by JeremyRuston?

Change History

Changed 5 years 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 5 years ago by FND

Baked Options Patch by JeremyRuston?

Changed 5 years ago by FND

Second pass at a patch by JeremyRuston?

Changed 5 years ago by FND

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

Changed 5 years 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 4 years ago by FND

  • description modified (diff)

Changed 4 years ago by FND

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

Changed 4 years ago by FND

  • severity changed from medium to high

Changed 4 years ago by FND

  • milestone changed from 2.5.3 to 2.5.4

Changed 4 years 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 4 years 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 years ago by MartinBudden

  • milestone changed from 2.6.2 to 2.7.1

Milestone 2.6.2 deleted

Changed 3 years ago by FND

  • milestone changed from 2.7.1 to 2.7

This should be added in 2.7, because it's a significant enhancement and because it should not linger any longer.

In case no definitive conclusion can be reached soon-ish, this ticket should be closed as wontfix.

Changed 3 years ago by MartinBudden

  • owner changed from JeremyRuston to MartinBudden
  • status changed from new to assigned

Changed 3 years ago by MartinBudden

  • status changed from assigned to new

Changed 3 years ago by MartinBudden

  • status changed from new to closed
  • resolution set to fixed

Fixed in changeset:12497

Note: See TracTickets for help on using tickets.