Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form in 'timeline/' should not allow refreshing and send the request again #33

Open
eapl-gemugami opened this issue Dec 13, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@eapl-gemugami
Copy link
Collaborator

In timeline/ we have a form to create a new twt.

When we press the Post button it's sending a Post request and loads the same page afterwards, so when we press the refresh button in your browser (in my case it was accidentally) you get the following message:

Capture d’écran du 2024-12-13 15-35-44

And then the browser shows the following text:

Document Expired
This document is no longer available.

Finally the .txt file stores the same twt each time the page is refreshed.

2024-12-13T21:35:37Z	A test!
2024-12-13T21:37:05Z	A test!
2024-12-13T21:39:32Z	A test!

To solve this issue, the pattern Post-Redirect-Get could be used:
https://en.wikipedia.org/wiki/Post/Redirect/Get

@sorenpeter
Copy link
Owner

Yes, it has also been annoying me when this happens.

It looks like one of us already tried to fix this back in the day:
https://github.com/sorenpeter/timeline/blob/main/views/new_twt.php#L83

@eapl-gemugami eapl-gemugami added the enhancement New feature or request label Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants