Page 1 of 1

Cache request connection

Posted: Sun Jan 30, 2022 10:09 am
by Haku
How to disable the cache connection on the request? I see that the second request does'nt reload connection just uses active session. In wireshark i see only 1 Client Hello and Server Hello. But the request function does'nt destroy the connection.

Re: Cache request connection

Posted: Sun Jan 30, 2022 10:15 am
by Haku
I use ICefRequest

Re: Cache request connection

Posted: Sun Jan 30, 2022 10:40 am
by salvadordf
Hi,

Try setting the ICefRequest flags.

UR_FLAG_DISABLE_CACHE or UR_FLAG_SKIP_CACHE might be what you're looking for.

Re: Cache request connection

Posted: Sun Jan 30, 2022 11:09 am
by Haku
Doesn't work. Connection still alive

Re: Cache request connection

Posted: Mon Jan 31, 2022 9:19 am
by salvadordf
If I understand you correctly you would like to make independent requests.

If that's the case you need to create each browser with a new request context and a different cache directory. Those browsers will be completely independent.

See the MDIBrowser demo for all the details :
https://github.com/salvadordf/CEF4Delphi/blob/d93927b5c8a2926a9b31fd7d821a683693650397/demos/Delphi_VCL/MDIBrowser/uChildForm.pas#L203

Re: Cache request connection

Posted: Mon Jan 31, 2022 9:54 am
by Haku
No i use CEFUrlRequestClientComponent and i see how after 1 request the connection is still alive and sometimes sends keep-alive tcp requests. I would like to destroy connection

Re: Cache request connection

Posted: Tue Feb 01, 2022 8:35 am
by salvadordf
Try creating a new request context and use it as a parameter in TCefUrlRequestRef.New

Re: Cache request connection

Posted: Tue Feb 01, 2022 8:58 am
by Haku
The URLRequest example already uses TCefUrlRequestRef.New for requests and doesn't destroy the connection. A new request uses previous connect session from Client Hello