Does OPTIONS query make 2x application slower?

I have a very intense single page application using the API. Say the application is located at application.com. Now, if I put the API in api.application.com, it will enable CORS, so all browsers will make a request OPTIONSbefore the actual request.

Does this make my 2x application slower?

+4
source share
1 answer

This probably won't make your application twice as slow. Sometimes it can issue 2 HTTP requests when you can expect them. But your application is probably more than just HTTP requests, so you will need to measure the performance of your application as a whole.

, , :

  • HTTP (GET, HEAD, POST)
  • HTTP-, Accept, Accept-Language, Content-Language Content-Type ( Content-Type application/x-www-form-urlencoded, multipart/form-data text/plain)

HTTP- , . - OPTIONS , ( ). , ( . Chrome/Safari 5 , FF 24 ).

, . : CORS

+5

Source: https://habr.com/ru/post/1548118/


All Articles