jeudi 30 juin 2016

Server side (or clientside??) solution to prevent multiple ajax requests across sessions?

I had a quick question. I have a login on my site (using Auth0 + Firebase). The site is using Ember JS. When you login, you have a dashboard, and when you click on the "Display" button, it shows a live feed pulling from Twitter's API and Instagram's API using AJAX requests. However, if you open the same page on multiple screens with the same user, it makes double the ajax requests, or triple depending on the amount of screens it's on. Is there any way to make this server side? Have it make the requests once on the server and then just fetch it from there live?

Ideally, I would like for people to login across multiple computers, click their "display button", and be projected the same stream. I figure this would need to be server side, i'm just at a loss of where to even start. I essentially just want to prevent 15 simultaneous ajax requests across sessions, and just have them fetch the 1. Is this even possible?

Thanks for the help is advance!




Aucun commentaire:

Enregistrer un commentaire