Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Limit browser version
#7
(11-21-2023, 05:59 AM)Alexandre Machado Wrote: 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:


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

Hi Alexandre,

That's a good example! Is it possible to customize this page (especially the texts)?
The way to success is always under construction ... but i see a light at the end of the tunnel  Idea Big Grin
Reply


Messages In This Thread
Limit browser version - by mhammady - 11-17-2023, 04:38 PM
RE: Limit browser version - by Alexandre Machado - 11-21-2023, 05:47 AM
RE: Limit browser version - by Alexandre Machado - 11-21-2023, 05:59 AM
RE: Limit browser version - by Lorbass - 11-23-2023, 09:54 AM
RE: Limit browser version - by Alexandre Machado - 11-21-2023, 06:05 AM
RE: Limit browser version - by mhammady - 11-21-2023, 12:25 PM
RE: Limit browser version - by Alexandre Machado - 11-22-2023, 06:34 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)