The SPA I know will use local storage combined with server-side storage. Server-side storage can solve the restart problem you mentioned above. You can also allow users to log in and bind relevant data to the user. Of course, the specifics still depend on the needs of the project.
1 Isn’t it natural that the page should be refreshed after pressing F5? What if my SPA is refreshed? It does not change any user habits, and users will not feel confused. 2 Instead, users should slowly develop the habit of not having to press F5 in SPA. 3 I feel that what needs to be done is to save the user login status. This can be stored in the session of the server. It is the same as traditional web applications and has nothing special.
The SPA I know will use local storage combined with server-side storage. Server-side storage can solve the restart problem you mentioned above. You can also allow users to log in and bind relevant data to the user. Of course, the specifics still depend on the needs of the project.
1 Isn’t it natural that the page should be refreshed after pressing F5? What if my SPA is refreshed? It does not change any user habits, and users will not feel confused.
2 Instead, users should slowly develop the habit of not having to press F5 in SPA.
3 I feel that what needs to be done is to save the user login status. This can be stored in the session of the server. It is the same as traditional web applications and has nothing special.