A developer writes JavaScript code that fetches data from an API and updates the DOM without reloading the page. This approach is called what?
- A.Server-side rendering
- B.CGI scripting
- C.Server push
- D.AJAX (Asynchronous JavaScript and XML)
Why D is correct
AJAX (and its modern form using the Fetch API or XMLHttpRequest) allows pages to communicate with a server asynchronously, updating content without a full page reload. Server-side rendering generates the full HTML on the server.
Know someone studying for Web App Fundamentals? Send them this one.