Skip to content
Advertisement

Tag: call

How to “store” data from an API call and refresh it (make new call) overtime (replacing old stored contents) on website

I’m a volunteer for this association/game called FAF. We have a leaderboards (https://www.faforever.com/competitive/leaderboards/1v1) of players that we get through API calls. However, it isn’t very efficient to make it so everytime someone opens the leaderboard page to make an API call to get the rankings. However, Imagine if 1000 people visit it, that would be 1000 calls to the API

JavaScript: Detect AJAX requests

Is there any way to detect global AJAX calls (particularly responses) on a web page with generic JavaScript (not with frameworks)? I’ve already reviewed the question “JavaScript detect an AJAX event”, here on StackOverflow, and tried patching in the accepted answer’s code into my application but it didn’t work. I’ve never done anything with AJAX before either so, I don’t

Advertisement