Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
Cache request connection
Cache request connection
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.
- salvadordf
- Posts: 4580
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Cache request connection
Hi,
Try setting the ICefRequest flags.
UR_FLAG_DISABLE_CACHE or UR_FLAG_SKIP_CACHE might be what you're looking for.
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
Doesn't work. Connection still alive
- salvadordf
- Posts: 4580
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Cache request connection
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
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
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
- salvadordf
- Posts: 4580
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Cache request connection
Try creating a new request context and use it as a parameter in TCefUrlRequestRef.New
Re: Cache request connection
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