How to reset the website when the user leaves it, with vibe.d?

vnr cfcr at gmail.com
Tue Jun 29 20:25:40 UTC 2021


On Tuesday, 29 June 2021 at 19:05:43 UTC, WebFreak001 wrote:
> On Tuesday, 29 June 2021 at 16:25:09 UTC, vnr wrote:
>> Hello 😊
>>
>> I have a bit of a problem that seems simple enough, but I 
>> can't find an answer to my questions. On my website, I have 
>> two textareas that the user can write on. When the user 
>> reloads the page or closes it and then reopens it, the text he 
>> wrote is still written, which is quite annoying.
>>
>> So my question is how to reset the website (the page) when the 
>> user reloads or quits.
>>
>> I've looked at the vibe.d's sessions, because that's probably 
>> where the answer to my question lies, but from what I 
>> understand, it requires a "login and logout form" (at least, 
>> all the code examples do this), which I don't want, because I 
>> want the website to be accessible without logging in.
>>
>> Do you have any ideas on how to fix this, probably with 
>> sessions?
>
> this is a client behavior that is implemented by some browsers, 
> it has nothing to do with vibe.d.
>
> Set autocomplete to off to fix this: 
> https://stackoverflow.com/questions/2486474/preventing-firefox-from-remembering-the-input-value-on-refresh-with-a-meta-tag

Thanks a lot for the explanations, I didn't know the 
autocomplete="off" tag.

Nevertheless, the problem persists and seems to be even deeper, 
indeed, my site is hosted on Heroku and I can see what a user who 
is on another machine has written (behavior I just found out). 
Fortunately, this little site is only for entertainment purposes, 
but it is a behavior that seems quite vicious.

If you want to access the code, it is on [this 
repository](https://github.com/noc-lang/playground) (it is just a 
playground for the language of a friend).





More information about the Digitalmars-d-learn mailing list