What is the difference between the traditional spider and the AJAX spider in ZAP?

IntermediateConceptOWASP ZAP
Answer

Short answer

The traditional spider discovers pages by parsing HTML for links and forms — fast, but it can't see content created by JavaScript. The AJAX spider drives a real headless browser, executes JavaScript and clicks through the UI, so it finds routes in single-page apps (React, Angular, Vue) — slower but much better coverage for modern front ends.

Comparison

Traditional spider AJAX spider
How Parses HTML responses Runs a headless browser (Firefox/Chrome)
Speed Fast Slow
SPAs Misses JS-rendered routes Finds them
Use Server-rendered sites, quick baselines Modern front ends, full scans

In packaged scans

zap-full-scan.py -t https://staging.shop.example.com -j    # -j adds the AJAX spider

What to say in the interview

"The traditional spider parses HTML links and is fast; the AJAX spider uses a headless browser to execute JavaScript and discover SPA routes. For React or Angular apps I enable the AJAX spider, or better, scan the backend API using its OpenAPI spec."

All Security Tools questions Roadmap: OWASP ZAP — dynamic testing (DAST)

More on OWASP ZAP