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