Page 1 of 2

Browser version checking ?

PostPosted: Wed Nov 05, 2014 9:33 am
by johndoo
Hello,

I have several VirtualBox Computers and one is an old XP with IE7 installed.
I tried to connect to the poker server with IE7 and since the server supports only IE10+ it doesn't work ... but I only have a javascript error and nothing that appears (I expected at least a generic html error page).

I know I could add some javascript in the "top html" tag to test browser version and return an html error, but I also want to avoid loading the html5 client in this case.

Is there a way to to that ?

Thanks

Re: Browser version checking ?

PostPosted: Wed Nov 05, 2014 9:40 am
by johndoo
Oh I forgot to say that for testing purpose I will have no index page before the client loading (else the test can occur in the index page).
So the index page of the website is the poker client itself ;)

Re: Browser version checking ?

PostPosted: Wed Nov 05, 2014 10:22 am
by Kent Briggs
You should get a javascript popup message stating that WebSocket support is required. The first code executed is this:

Code: Select all
  if ("WebSocket" in window == false)
  {
    alert("This browser does not support WebSockets");
    return;
  }

Re: Browser version checking ?

PostPosted: Wed Nov 05, 2014 10:43 am
by johndoo
No I have just 2 javascript errors (this is a translation) "line 3 at pos 29694 unknown property or method for the object" and then "line 620 at pos 1 object expected" , main page is loaded the error seems to occur in the code of the client_frame iframe.

Re: Browser version checking ?

PostPosted: Wed Nov 05, 2014 10:52 am
by johndoo
Perhaps you could add a try catch and show the alert also if the code throws an exception ?

Re: Browser version checking ?

PostPosted: Wed Nov 05, 2014 10:55 am
by Kent Briggs
Ok, it looks like old versions of IE are crashing on the newer JQuery code which loads before the websocket check. I'll look into it.

Re: Browser version checking ?

PostPosted: Sat Nov 08, 2014 6:38 am
by johndoo
Hello,

I've tested version 4.33 and now I can see your alert message :D

But after the alert there is still a javascript error (see attachment), this prevents top/bottom/left/right html from showing in brower (the browser stops loading the page ?).


Wouldn't be a nice feature if instead of showing an alert (that is not in translation table ?), you add an html text server parameter that will be sent to client interface (replacing the client content).
We could then show to the user some links to download last versions of browsers and translate it.

I understand that this is not "high priority" feature, anyway if I don't suggest it, I will never have it ;)

JSerror.jpg
JSerror.jpg (62.78 KiB) Viewed 4232 times

Re: Browser version checking ?

PostPosted: Sat Nov 08, 2014 10:33 am
by Kent Briggs
johndoo wrote:I've tested version 4.33 and now I can see your alert message :D
But after the alert there is still a javascript error


I just moved the websocket test in front of the jquery declaration so it would fire before the error. Whether your browser shows javascript errors or not is a local configuration. I have XP on an old notebook PC with IE 8 and it doesn't show any errors after the websocket alert.

Re: Browser version checking ?

PostPosted: Sat Nov 08, 2014 11:14 am
by johndoo
I use IE7 in this XP virtualbox, I know it is unlikely that people still use this configuration (XP+IE7) , but being able to customize/translate error message could be usefull.

Re: Browser version checking ?

PostPosted: Sat Nov 08, 2014 11:47 am
by Kent Briggs
johndoo wrote:but being able to customize/translate error message could be usefull.


This check occurs on a static index page before any interaction back with the server.