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.JSON-P (JSON with Padding and callbacks)
- B.Long polling (held requests and replies)
- C.SSR (Server Side Rendering and hydration)
- 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.