• AHopeOnceMore [he/him]B
    ·
    1 year ago

    In this case it is specifically a web API. That's also how this site works: your browser loads some code that knows how to ask another server (computer connected to the internet) for the data this site needs to work: posts, images, your user profile, the little funny message at the top. It's very dynamic - when you click on "sort by new" it doesn't totally reload the page, it asks foe the new data and updates in-place.

    The web API is what the server exposes, and what the code in your browser is sending messages to, asking for posts, images, your profile, and so on. It actually works as a URL, just with some extra info added. Like api.whatever.com/posts might be where your browser asks for the latest posts. Maybe it needs to know the latest posts' 2nd page, or 3rd page, so it adds that extra info somewhere in its request, somewhere that the web API expects to find it.

    This is also a great way to support mobile apps - they can ask for the same data and display it in the app instead of a web browser.

    Reddit works exactly the same way, as do most rich, interactive websites.