Browser & Web Performance · Senior · Question 43 of 75

Why do preflights hurt performance in an API-heavy SPA, and how can you reduce them?

Explanation

Serving the API under the app's origin (/api) removes CORS entirely. Preflight caching is per URL and capped by browsers.

Further reading

Problem with a question

Browser & Web Performance · Senior · question 43

Test yourself

Take the Browser & Web Performance · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz