2 ms·
Even then, most often your backend API service runs off one domain, so it needs only one OPTION request ever two hours for the user session. If your users make
by berkes 5y ago
Even then, most often your backend API service runs off one domain, so it needs only one OPTION request ever two hours for the user session.
If your users make only one request per two hours, that still doubles the requests, so in that case caching'll hardly help. But in more typical cases, where one session does 20+ requests, it's a meagre 5% of the requests. In which case 'resolving that n+1 request' or 'speeding up that 1200ms response' is far better low hanging fruit than removing the single OPTIONS request.
It depends on your case, though.