Hello.
For me, the function that can be seen in the hash code,
Saving temporarily...
I'd like to implement the function.
1.
I think the principle of implementing this function is
1. Count a certain amount of time in the keyup event and temporarily save it to DB if no input occurs
2. SetInterval() temporarily stored in DB every certain time
I think of a way to do that.
2.
Also, I wonder where you save it.
1. How to save to a normal DB
2. How to use redis and memcached
3. How to use localStorage
Is there any example of hash code that I think is implemented? Also, please help me with which method can be optimized for items 1 and 2.
ps. The environment in which you want to use the above function is the screen where you create a post like a hash code. However, there are more inputs that you create on one screen. ( input, textarea, file )
hashcode javascript
If I answer just once,
It is estimated that after a certain period of time after starting typing, it is implemented to send the contents of the writing to the server. If you look at the traffic, it's sure to send it to the server, but I'm not sure what kind of event the trigger is.
I think you can compare what you wrote every certain time and send it to the server if there is any change. After completing the preparation, delete the data that registered the draft.
© 2024 OneMinuteCode. All rights reserved.