Re: HTTP PREVIEW method

Using a new method has many benefits:

- Forbidding a bunch of headers you don't want in a preview request
(Cookies, DNT, etc).
- Explicitly not working with older software.
- Being able to throw in that #anchor tag and take it into account on the
preview (useful for Wikipedia article sections).
- Etc.

Aside from the thing about #anchor tags, these enable making the fast path
even faster, so it would use less resources.

On Wed, Nov 24, 2021, 15:49 Evert Pot <me@evertpot.com> wrote:

> This sounds like this should be solved with either the 'Prefer:
> return=minimal' header, or (probably the better choice)
> content-negotation using Accept.
>
> On 2021-11-24 12:08, Soni L. wrote:
> > 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 19:27:29 UTC