💾 Archived View for rawtext.club › ~sloum › geminilist › 006552.gmi captured on 2023-09-08 at 16:55:22. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-11-30)

-=-=-=-=-=-=-

<-- back to the mailing list

[tech] Client history behavior with redirects

Oliver Simmons oliversimmo at gmail.com

Thu May 20 17:16:39 BST 2021

- - - - - - - - - - - - - - - - - - - 

On Mon, 17 May 2021 at 17:50, Michael Lazar <lazar.michael22 at gmail.com> wrote:

Hi all,
I have a question on a common design pattern in gemini. Say we have
a guestbook, message board, etc. that accepts user comments via an
input query. A normal session with a client might look like this:
```
C: /
S: 20 text/gemini (display the home page)
C: /guestbook
S: 20 text/gemini (display the guestbook page)
C: /guestbook/input
S: 10 enter your message
C: /guestbook/input?hello%20world
S: 30 /guestbook (submit the user's message and redirect)
C: /guestbook
S: 20 text/gemini (display the guestbook page)
```
Now, what should happen at this point when the user clicks the
"back" button in their client?
⚞snip⚟

The way I would like it is:```C: /S: 20 text/gemini (display the home page)Stored in history

C: /guestbookS: 20 text/gemini (display the guestbook page)Stored in history

C: /guestbook/inputS: 10 enter your messageNot stored due to it being an input (resp. code 1x)

C: /guestbook/input?hello%20worldS: 30 /guestbook (submit the user's message and redirect)Redirect not stored, the page redirected to should be stored (resp. code 3x)

C: /guestbookS: 20 text/gemini (display the guestbook page)Stored in history. It's a duplicate of the previous page in historythough, so it should probably be removed.```

That is, response codes 1x and 3x aren't stored in history, andduplicates of the same URI (including query!) in history are mergedinto one.It's not the query that makes it not store, it'd be the response code.So if /guestbook/input?hello%20world gave a 20 response code insteadit would be stored, as that's likely a unique page e.g. search resultsor generated content.

This shouldn't be required behaviour, it'd be a "best practice"recommendation instead.Different browsers have different preferences and in an ideal worldthis would be configurable by settings.

-Oliver Simmons