I am building a javascript plugin that a client will include in his. The plugin will track data user activity like page scroll, button clicks mouse movements etc and then save to web storage. This data then need to be send to a back end server at regular intervals of say 5-10 seconds in json format.
- If I use a simple ajax for sending data by using setInterval method will that impact user browsing experience.?
- Will using websockets make more sense in this case or is there any other way?
NOTE: The backend server application is based on Spring MVC and the javascript plugin will push data to server externallly from clients application.