Where Pages Live

We describe where the json representing a wiki page can be stored and how pages move between these stores.

Representation

A wiki page is a json object with members for title, story and journal. All are optional so {} can be a page, but [] cannot.

A title is expected to be a string which can be converted into a Slug. Titles of various capitalization will produce the same slug. Stores often index pages by their title's slug. The slug of a slug is the slug.

We think of a page as being json even when it has been parsed into some host system's object representation. Good practice does this parsing as soon as possible.

Residence

Servers managing a single site or a farm.

Servers on the internet, an intranet, or a private computer.

Local Storage in an html5 browser.

Included with plugins as documentation.

DOM elements of class 'page'.

Create actions within the journal of a later version.

Importer scripts and the files they read.

HTML text cached somewhere in the web from a server-side rendering.

System pages, like recent-changes.json are constructed on demand from system information.

Addressing

Internet addresses for pages are formed by combining slugs with various storage indications.

origin.com/slug.html — retrieve the HTML rendering

origin.com/view/slug — retrieve the js to render slug

origin.com — same as origin.com/view/welcome-visitors

origin.com/view/slug_rev2 — render a revision of a slug

The js rendering interprets various alternative storage indicators. These can be repeated in indicator/slug pairs to specify multiple pages to be displayed at once.

origin/slug — retrieve page from origin server ignoring browser local storage copy if any.

local/slug — retrieve page from browser local storage ignoring the origin server copy if any.

view/slug — retrieve page from origin or local, giving preference to local if present

domain.com/slug — retrieve page from a remote server ignoring copies in local or origin.

Transport

A browser gets a page from a server in response to a GET request, often via ajax.

A browser puts updates to a page by sending actions that can be interpreted by the server, presumably via ajax.

A browser writes whole pages to its own local storage when it cannot save edits on a remote machine.

A browser puts a bundle of pages, usually changes, usually stored in new space on a farm.

A browser puts an individual page from local storage to a writable origin. This is a recent variation on the fork action.

A browser gets a page from a remote server via CORS request.

A browser gets a page from a remote server via the origin server acting as a proxy. This is deprecated but not yet eliminated.

An administrator moves pages or whole sites by scp or related mechanisms.

An importer runs and writes, typically, to page space of a private computer.

An importer runs automatically and writes to page space of a public server.

An importer adds its constructed story to a create action in the journal.

An importer retrieves previously constructed pages so as to preserve previous creates that exist in those journals.

Fork

A fork involves retrieving a page from one store and saving it in another store where it can be updated independently from its source.

A fork should be recorded as a fork action in the journal. This satisfies the attribution requirement of the creative commons attribution, share-alike license.

Caching a page for more efficient access is not a form of forking.

Publishing a page from a private staging location is not a form of forking.

Saving a page in browser local storage is considered a fork. Saving it back to the origin is also a fork.

Ghosts

A ghost page is one that isn't explicitly stored in the server's database.

A revision retrieved by reconstructing it from the journal of a page.

A page that is cited in a link or in a url but does not yet exist.

A page that holds the results of a search.

A page that holds the results from a failed server request.

But not a page retrieved from the pages component of a plugin.

But not a page retrieved from the server's default pages directory.

But not a system page like recent-changes.