HTTP PREVIEW method

It would be potentially useful to have an HTTP PREVIEW method. Consider for
example this mastodon issue:
https://github.com/mastodon/mastodon/issues/4486

Here's what happens when a wiki has to generate a full page:

1. Parse cookies
2. Get user data
3. Get page contents
4. Resolve "redlinks" (links within the wiki that refer to nonexistent
pages)
5. Create Table of Contents
6. Format full page
7. Etc

Here's what it'd do with an HTTP PREVIEW:

1. Get page contents
2. Trim it down to some arbitrary but small length
3. Create a simplified HTML that contains all the relevant data in the
<head>, and an empty <body>.

Given how much less work this would involve for the server, it could help a
lot with the above issue. As a bonus, HTTP PREVIEW could even be specced to
accept the #anchor part, providing for even better previews.

Received on Wednesday, 24 November 2021 17:09:20 UTC