11-21-2023, 05:59 AM
(This post was last modified: 11-21-2023, 06:04 AM by Alexandre Machado.)
Technically responding your question, even though I believe you should reconsider your requirements, yes, IntraWeb is flexible enough to allow you to do mostly anything.
You can block the new session using a code such as this:
With this code I'm creating an incompatible version of Chrome everytime. Of course you have to adjust this and add an *if* statement before this code to check for the browser version is not the latest (hint: you can use TBrowser.MajorVersion property for this, refering to the rBrowser instance, before releasing it of course). This will terminate the session and reject the request with a nice page with links to the latest version of major browsers (Chrome, Edge and Firefox). See below
You can block the new session using a code such as this:
Code:
procedure TIWServerController.IWServerControllerBaseBrowserCheck(
aSession: TIWApplication; var rBrowser: TBrowser);
begin
rBrowser.Free;
rBrowser := TChrome.Create(TChrome.MIN_VERSION - 1);
end;With this code I'm creating an incompatible version of Chrome everytime. Of course you have to adjust this and add an *if* statement before this code to check for the browser version is not the latest (hint: you can use TBrowser.MajorVersion property for this, refering to the rBrowser instance, before releasing it of course). This will terminate the session and reject the request with a nice page with links to the latest version of major browsers (Chrome, Edge and Firefox). See below

