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."
More on OWASP ZAP
What is OWASP ZAP and how do you run a DAST scan?BeginnerWhat is the difference between SAST and DAST?BeginnerWhat is OWASP ZAP?BeginnerWhat is the difference between a ZAP baseline scan and a full scan?BeginnerHow do you run a ZAP baseline scan with Docker?BeginnerHow do you read a ZAP report?Beginner