?
Solved

Need details about user's config

Posted on 2005-03-09
17
Medium Priority
?
1,293 Views
Last Modified: 2013-11-18
I have some trouble helping external users onto a (restricted access - I can't show you) company site.
Known issues include stuff like unsupported browsers, browser versions (perhaps even OS), java versions, javascript disabled, cookies disallowed, OCX and pop-up blockers.

Some users work in a controlled environment that doesn't allow them to verify their browser settings (javascript on/off) etc. Additionally, they could send me a list of all the software that they have installed, and I still wouldn't be able to tell what software holds a pop-up blocker and how to set it to allow popups from "our" site.

Does anyone know of a way to verify such things in an easy way? E.g. a set of tests performed through a certain webpage that would provide a list of test results like:

OS: ...
Browser: ...
Java version: ...
Popups: allowed/blocked
Javascript: enabled/disabled
...

Or perhaps anyone with a better idea on how I can pinpoint possible problems easier (or at all)?
0
Comment
Question by:CRAK
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 4
  • 2
  • +1
17 Comments
 
LVL 29

Expert Comment

by:bloodredsun
ID: 13495348
Most of this is easy to do, it just depends on what language you want to do it in, JSP, ASP, PHP, Perl?
0
 
LVL 13

Author Comment

by:CRAK
ID: 13495880
My knowledge regarding web development doesn't extend beyond html, js and css. I am aware that this is insufficient to do the complete job.

Can any of these be send off as a single file or do they need a server in the background?
Not sure if any of our servers on www support ASP, PHP etc. but I'm sure there must be a free hosting service somewhere to accomodate the handfull of hits per month?

I'd already be happy if I could mail them an url. Even if it's not one of ours, but an existing site elsewhere.
0
 
LVL 29

Expert Comment

by:rdivilbiss
ID: 13495942
Since you can't access the client side and they may not have java script you might not be able to find out all that you would like.

The browser will tell you the basics of what it will do in the HTTP headers, and you can test for javascript.

http://www.rodsdot.com/ee/browser_test.asp

Could probably expand the tests if JavaScript is enabled.

0
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 
LVL 6

Expert Comment

by:infex
ID: 13496004
If you use microsoft servers (2000, NT, XP) you have also support for ASP, without any extra cost (you need to configure IIS if necesary).

In asp, you can if a page use the following.

<% for each item in request.servervariables %>
... handle the information you get there ...
<% next %>

0
 
LVL 29

Expert Comment

by:rdivilbiss
ID: 13496079
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>

<script language="javascript" type="text/javascript" src="../include/cookies.js"></script>
<script language="javascript" type="text/javascript">
<!--
document.writeln('<pre><strong>JavaScript is enabled</strong></pre>');
storeMasterCookie();
storeIntelligentCookie("TEST","Cookie Accepted");
if (Get_Cookie("TEST")!='') {
    document.writeln('<pre><strong>'+Get_Cookie("TEST")+'</strong></pre>');
}

//-->
</script>
<noscript>
      <pre><strong>JavaScript is disabled.</strong></pre>
</noscript>
<title>Browser Test</title>
</head>

<body>
<%
response.write("<pre>")
for each item in request.servervariables
      response.write "<strong>" & item & ": <strong>" & request.servervariables(item) & "<br>"
next
%>
</body>

</html>
0
 
LVL 29

Expert Comment

by:rdivilbiss
ID: 13496233
To above add:

if (Get_Cookie("TEST")!=null) {
    document.writeln('<pre><strong>'+Get_Cookie("TEST")+'</strong></pre>');
} else {
    document.writeln('<pre><strong>COOKIE REFUSED</strong></pre>');
}
var popup = window.open('testpop.asp','test');
if (Get_Cookie("TESTPOP")!=null) {
    document.writeln('<pre><strong>'+Get_Cookie("TESTPOP")+'</strong></pre>');
} else {
    document.writeln('<pre><strong>POPUP BLOCKED</strong></pre>');
}

So far:

We know Browser is IE 6
They accept all document types
They are set to read english-us
They OS is Windows XP (NT 5.1)
.NET 1.1 is loaded
JavaScript is enabled
Our Cookie was Accepted
Our Popup Was Blocked
Their remote IP is 64.151.6.52

All I need now id to detect Java....

0
 
LVL 29

Expert Comment

by:rdivilbiss
ID: 13496371
Here is Java and screen info.  Obviously if JavaScript is disabled, popups are blocked.  You can still test cookies in server side code, both session and regular cookies.

Of course the session cookie gets tested automatically...
ASPSESSIONIDSQDSBRBR=KBMPIOFBEOKECOEHBLFAMKGM

http://www.rodsdot.com/ee/browser_test.asp

if (navigator.javaEnabled()==true) {
      document.writeln('<pre><strong>Java Enabled</strong></pre>');
}else{
      document.writeln('<pre><strong>No Java</strong></pre>');
}
document.writeln('<pre><strong>Screen Size: </strong> '+screen.width+'X'+screen.height+'</pre>');
document.writeln('<pre><strong>Color Depth: </strong> '+screen.colorDepth+' bit</pre>');
document.writeln('<pre><strong>Available Window: </strong> '+screen.availHeight+'X'+screen.availWidth+'</pre>');
0
 
LVL 29

Expert Comment

by:bloodredsun
ID: 13496623
If you wanted to do this on the server side in Java, you can just iterate over the header values from the http request. like this in a JSP

<%
for (Enumeration headerenum = request.getHeaderNames(); headerenum != null && headerenum.hasMoreElements(); ) {
  String headerName = (String) headerenum.nextElement();
%>
<LI><%= headerName %>:
<%
for (Enumeration headerenum2 = request.getHeaders(headerName); headerenum2 != null && headerenum2.hasMoreElements(); ) {
%>
<%= headerenum2.nextElement() %>
<%
}
%>

It doesn't provide you with all the information that a browser JavaScript would as it does not have access to all the variables but the benefit is that it will always work, no matter if the user has javascript and java support switched off, because it is done on the server.

You can then use response.sendRidirect or RequestDispatcher.foward to send the user to another page.
0
 
LVL 29

Expert Comment

by:rdivilbiss
ID: 13496752
Yes, but if you detect JavaScript turned on, you can also go ahead and run the other tests, so you want to include those as well.
0
 
LVL 13

Author Comment

by:CRAK
ID: 13500963
Wow.... this is heading the right way!

One of the applications that we're running (Lotus Learningspace) requires javascript. If that test fails the application will fail.
No problem if javascript is used for the rest of the tests.

Is there a way to show the java version number in a similar way? I now use "java -version" in a command prompt window.
It's hard enough to get computer fobic users to open a command promt, but getting them to enter that instruction and read out its results sometimes requires more patience than I manage to collect.

I still have a problem regarding http://www.rodsdot.com/ee/browser_test.asp.
Using XP SP2 here, the pop-up got blocked at first (as expected). After allowing popups for the site and reloading it, I am still getting the message "POPUP BLOCKED". I have no other pop-up blocker installed.
A Win2000 box w/o blocker also shows this message.
Anything wrong with the TESTPOP cookie? I'll look into it myself tomorrow. Haven't reviewed testpop.js yet.

0
 
LVL 29

Expert Comment

by:rdivilbiss
ID: 13501339
>Anything wrong with the TESTPOP cookie?

Timing issue...try now.
0
 
LVL 29

Accepted Solution

by:
rdivilbiss earned 2000 total points
ID: 13501687
http://www.rodsdot.com/ee/browser_test.asp

Now detects Flash and Java Version.

You need a java applet to test for Java VM version and vendor.

Get JavaVersionDisplayApplet.class from http://support.softartisans.com/kbview_839.aspx

and install it in the same directory as your detect page.

I think we covered the issues you requested: <smile>
(full code to follow)

>Does anyone know of a way to verify such things in an easy way? E.g. a set of tests >performed through a certain webpage that would provide a list of test results like:

>OS: ...
>Browser: ...
>Java version: ...
>Popups: allowed/blocked
>Javascript: enabled/disabled

If you need more detection capabilities, you'll need to get BrowserHawk.

cookies.js is from http://tech.irt.org/articles/js064/

-------------------browser-test.asp-----------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
<title>Browser Test</title>
<meta name="author" content="Roderick Divilbiss">
<meta name="copyright" content="© 2005 Roderick Divilbiss">
<script language="javascript" type="text/javascript" src="../include/cookies.js"></script>
<script language="javascript" type="text/javascript">
<!--
document.writeln('<pre><strong>JavaScript is enabled</strong></pre>');
storeMasterCookie();
storeIntelligentCookie("TEST","Cookie Accepted");
if (Get_Cookie("TEST")!=null) {
    document.writeln('<pre><strong>'+Get_Cookie("TEST")+'</strong></pre>');
} else {
    document.writeln('<pre><strong>COOKIE REFUSED</strong></pre>');
}
if (navigator.javaEnabled()==true) {
      document.writeln('<pre><strong>Java Enabled</strong></pre>');
      document.writeln('<div id="javaver">Testing....</div>');
}else{
      document.writeln('<pre><strong>No Java</strong></pre>');
}
var myVal = 5;
function pSuccess() {
      if (myVal==0) {
            document.getElementById('popres').innerHTML = '<pre><strong>POPUP WORKED</strong></pre>';
            return true;
      } else {
            document.getElementById('popres').innerHTML = '<pre><strong>POPUP BLOCKED</strong></pre>';
            return false;
      }
}
var popup = window.open('testpop.asp','test');
      if (popup.opener == null) popup.opener = self;
setTimeout('pSuccess()',1000);
function flashInstalled()
{
      result = false;
      if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"])
      {
            result = navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin;
      }
      else if (document.all && (navigator.appVersion.indexOf("Mac")==-1))
      {
            // IE Windows only -- check for ActiveX control, have to hide code in eval from Netscape (doesn't like try)
            eval ('try {var xObj = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if (xObj)      result = true; xObj = null;      } catch (e)      {}');
      }
      return result;
}
if (flashInstalled()) {
    document.writeln('<pre><strong>Flash: </strong>Installed</pre>');
} else {
    document.writeln('<pre><strong>Flash: </strong>Missing</pre>');
}
document.writeln('<pre><strong>Screen Size: </strong> '+screen.width+'X'+screen.height+'</pre>');
document.writeln('<pre><strong>Color Depth: </strong> '+screen.colorDepth+' bit</pre>');
document.writeln('<pre><strong>Available Window: </strong> '+screen.availHeight+'X'+screen.availWidth+'</pre>');

//-->
</script>
<noscript>
      <pre><strong>JavaScript is disabled.</strong></pre>
</noscript>
<title>Browser Test</title>
</head>

<body>
<APPLET codeBase="." height="0" width="0"
    code="JavaVersionDisplayApplet.class"
    name="display"
    mayscript VIEWASTEXT>
</APPLET>
<div id="popres">Testing....</div>
<%
response.write("<pre>")
for each item in request.servervariables
      response.write "<strong>" & item & ": <strong>" & request.servervariables(item) & "<br>"
next
%>
<script>
var app = document.applets[0];
var version = app.getVersion();
var vendor = app.getVendor();
if (version!=null) {
      document.getElementById('javaver').innerHTML = '<pre><strong>Version: </strong>'+vendor+' '+version+'</pre>';
} else {
      document.getElementById('javaver').innerHTML = '<pre><strong>Version: </strong>Unable To Detect</pre>';
}
</script>
</body>

</html>
--------------------------------------------------------------
--------------------------testpop.asp-----------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
<script language="javascript" type="text/javascript">
<!--
window.opener.myVal=0;
self.close();
</script>
<title>Test</title>
</head>

<body>
</body>
</html>
--------------------------------------------------------------

Phew!!!!
0
 
LVL 29

Expert Comment

by:rdivilbiss
ID: 13501702
As usual......Oops.

Correct testpop.asp, which frankly could simply be htm since I never used any ASP in it.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
<script language="javascript" type="text/javascript">
<!--
window.opener.myVal=0;
self.close();
-->
</script>
<title>Test</title>
</head>

<body>
</body>
</html>
0
 
LVL 13

Author Comment

by:CRAK
ID: 13504042
Excellent! I will certainly be upping points for all the effort!
Sometimes the applet seems to cause another timing issue though: it gets called before it is loaded.

Was OCX covered yet? It's mentioned as requirement for the client but I haven't much of a clue what it's about.
0
 
LVL 29

Expert Comment

by:rdivilbiss
ID: 13508163
I do not have a way to test this, as you can not detect ActiveX on Windows XP SP2.
(Security lock down with SP 2)

Add a divide

<div id="activex">Testing for ActiveX....</div>

essentially, at the end of the page, just before the </body> tag and after the Java Applet is tested you would have something like this:

<script language="VBScript">
<!--
Function checkAX()
  checkAX = -1
  On error resume next
  If ScriptEngineMajorVersion > 1 then
    test = IsObject(CreateObject(Microsoft.ActiveXPlugin.1))
    if test then
      checkAX = 1
    Else
      checkAX = 0
    End if
  End if
End Function
// -->
</script>
<script language="JavaScript">
<!--
try {
    var isActiveX = checkAX();
}
catch(e) {
    isActiveX = -1;
}
if (isActiveX==1) {
    document.getElementById('activex').innerHTML = '<pre><strong>ActiveX Available</strong></pre>';
} else {
    document.getElementById('activex').innerHTML = '<pre><strong>ActiveX Not Detected</strong></pre>';
}
//-->
</script>


You'll have to play with it, and you might want to test for IE in JavaScript and document.write the VBScript block only for IE browsers.

Or, like the java applet test, you could write a small ActiveX object (DLL or OCX) that you can try to download and call on the client side.
0
 
LVL 29

Expert Comment

by:rdivilbiss
ID: 13508293
Of course if you need them to run your company's OCX, I guess you could just test for it directly....

test = IsObject(CreateObject(Company.Product.1))
0
 
LVL 13

Author Comment

by:CRAK
ID: 13543798
Apologies for the silence. I found myself drowing in hi-prio work all of a sudden.

I raised point and will assign all of them to rdivilbiss for all the effort and completeness of the solution.

However, one last question. I keep getting this JS error when I reload your URL http://www.rodsdot.com/ee/browser_test.asp

Line 95, char 1: Object doesn't support this method or property.

Any ideas?


Thanks for the help!
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question