Interview Q&A · questions with model answers

jQuery Interview Questions

Ordered by how often they're asked. Most-asked answers are free to read in full; members see every answer and can rate their confidence on each.

  1. Why should you never use async: false in $.ajax?

    Synchronous requests block the browser's main thread until the response arrives: the page cannot scroll, render or respond to clicks, which can freeze the UI for seconds on a slow network. Browsers…

  2. Why debounce or throttle scroll and resize handlers, and how?

    scroll, resize, mousemove and input can fire dozens of times per second; running expensive work (layout reads, AJAX calls) on each event makes pages janky. Debouncing runs the work once after events…

Was this page helpful?

Report a mistake