Home > Software engineering >  How to preserve flask session after deleting browser history, cache?
How to preserve flask session after deleting browser history, cache?

Time:01-27

I´m developing an app that summarizes text, but i want that non-account user have limited entrances to the tool. Right now, i have accomplish this partially since these users only can use it 5 times a day, but i realized that deleting browser history restarts the session of the non-account user.

Can someone please guide me to the solution?

I´m basically using flask, javascript, ajax

I have done the limited entrances to the system for non-account users, but I´m trying to preserve this data (of how many entrances the user has with the tool) after the browser history and cache are deleted.

CodePudding user response:

You can log anonymous user access using other more static factors like IP address and use that to block more than 5 requests.

Flask has a library to implement the stated functionality called Flask Limiter. https://flask-limiter.readthedocs.io/en/stable

  • Related