Home > Back-end >  Does anyone know? About TIdHTTP Post response is slow, slower than the Get () three times
Does anyone know? About TIdHTTP Post response is slow, slower than the Get () three times

Time:10-04

Use TIdHTTP controls access to a web page, including the Get () operation time is 230 ms, Post () takes 1000 ms, using caught tools found a Post () operation is more than the Get () operations out of a process of the Connect, this operation takes 640 ms, every time it took a long time,

And use the web browser to open the post and Get () () the time is same, only more than 200 ms,

The great spirit which is how to return a responsibility excuse me? How to make a post () operation efficiency is high?

CodePudding user response:

Question which I doubt is cached in the IE browser is cached in the information system, IE is a shell, closed the IE cache are still, you'd better test method is to clear the IE cache, restart the computer, offline condition monitoring, start to connect to the Internet, using IE to access the specified page, the speed of access for the first time in the real you see what effects

For IdHTTP, it provides some parameters can realize the connection between leading function, is to do a connection, if you don't change the site there is no need for a second connection, and then POST it should save a little time

CodePudding user response:

reference 1st floor KFRGHT response:
question which I doubt is cached in the IE browser is cached in the information system, IE is a shell, closed the IE cache are still, you'd better test method is to clear the IE cache, restart the computer, offline condition monitoring, start to connect to the Internet, using IE to access the specified page, the speed of access for the first time in the real you see what effects

For IdHTTP, it provides some parameters can realize the connection between leading function, is to do a connection, if you don't change the site there is no need for a second connection, then POST it should save a little time


Agree, the learning

CodePudding user response:

refer to the original poster qq363436899 response:
use TIdHTTP controls access to a web page, including the Get () operation time is 230 ms, Post () takes 1000 ms, using caught tools found a Post () operation is more than the Get () operations out of a process of the Connect, this operation takes 640 ms, every time it took a long time,

And use the web browser to open the post and Get () () the time is same, only more than 200 ms,

The great spirit which is how to return a responsibility excuse me? How to make a post () operation efficiency is high?



Great god said is very right, according to what you have said to empty the browser connection target web page, after caught did find some different redirection of connection, and set up the auth this field is still in a Cookie, may in this has much to do, so I also use the redirection, but encountered a problem, the browser can Post method to redirect to the Get method, and TIdHTTP or Post after Post redirected, what method can modify TIdHTTP redirect method?

CodePudding user response:

reference 1st floor KFRGHT response:
question which I doubt is cached in the IE browser is cached in the information system, IE is a shell, closed the IE cache are still, you'd better test method is to clear the IE cache, restart the computer, offline condition monitoring, start to connect to the Internet, using IE to access the specified page, the speed of access for the first time in the real you see what effects

For IdHTTP, it provides some parameters can realize the connection between leading function, is to do a connection, if you don't change the site there is no need for a second connection, then POST it should save a little time



Great god said is very right, according to what you have said to empty the browser connection target web page, after caught did find some different redirection of connection, and set up the auth this field is still in a Cookie, may in this has much to do, so I also use the redirection, but encountered a problem, the browser can Post method to redirect to the Get method, and TIdHTTP or Post after Post redirected, what method can modify TIdHTTP redirect method?

CodePudding user response:

PosT redirection manually adding a Get operation after the failure to solve the redirection fails, all the changes, the speed of the PosT did not improve, the same as before, what's the problem?
  • Related