function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
downloadingdownloading 

browser instance

Hi 

my requirement is to display the name of the browser i am using, 

it maight be chrome or firefor or internet Explorer

on the vf page so , could anyone, sens me a sample code for this

or help me with an example an example how can i achieve this 

 

 

Thanks...!

Navatar_DbSupNavatar_DbSup

Hi,

 

Try the below code snippet as reference

 

<apex:page >

 <div id="example"></div>

 

<script type="text/javascript">

 

txt = "<p>Browser CodeName: " + navigator.appCodeName + "</p>";

txt+= "<p>Browser Name: " + navigator.appName + "</p>";

txt+= "<p>Browser Version: " + navigator.appVersion + "</p>";

txt+= "<p>Cookies Enabled: " + navigator.cookieEnabled + "</p>";

txt+= "<p>Platform: " + navigator.platform + "</p>";

txt+= "<p>User-agent header: " + navigator.userAgent + "</p>";

document.write("<B>"+navigator.Name+"</B><P>");

 

document.getElementById("example").innerHTML=txt;

 

</script>

</apex:page>

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.