User console redirection webpage uses unnecessary browser sniffing

User console redirection webpage uses unnecessary browser sniffing
https://ps.palmws.com/palmcsext/console/
That user console redirection webpage has this piece of JavaScript that uses unnecessary browser sniffing:
<script type="text/javascript" language="javascript">
function checkBrowser()
var agt=navigator.userAgent.toLowerCase();
var is_mac = (agt.indexOf("mac")!=-1);
var is_ie = (agt.indexOf("msie")!= -1);
var is_opera = (agt.indexOf("opera")!= -1);
var is_firefox = (agt.indexOf("firefox")!= -1);
var is_window = (agt.indexOf("window")!= -1);
var is_safari = (agt.indexOf("safari")!= -1);
if (is_window) {
if (is_firefox || is_ie || is_safari) {
window.location = "/palmcsext/console/pages/LoginPage.iface";
} else {
window.location = "/palmcsext/console/notfound/notfound.html";
} else if (is_mac) {
window.location = "/palmcsext/console/pages/LoginPage.iface";
} else {
window.location = "/palmcsext/console/pages/LoginPage.iface";
</script>
The browser sniffing is pretty harmful. Remove it.
Just simply change the script to:
window.location = "/palmcsext/console/pages/LoginPage.iface";

XP1 wrote:
If you look at the logic, even unsupported browsers will pass the test.
The if statements only check for supported browsers running on Windows or Mac OSes. If the user is using a different OS, regardless of supported or unsupported browser, the webpage will still redirect correctly.
The script doesn't do a good job of checking for supported browsers either. The user can set a custom user agent, and the code can't rely on the user agent string.
Checking for browser support should be done by feature detection, not by user agent string checking.
If the user sets a custom user agent string or uses a browser with which the code works, then it harms the user.
The concept of the web is that it should work everywhere. Blocking browsers not only harms the user but also harms the web.
If the code is written to web standards, the webpage should work in all modern browsers.
Thus, it is pointless, inefficient, and unnecessary to have those if statements there.
Like I said, the code can be simplified by just using 1 line:
window.location = "/palmcsext/console/pages/LoginPage.iface";
I have asked for more specifics here to find out why that logic is in place.  Not saying I can post back anything, but I have asked.
And unless I'm reading it wrong, the check for unsupported browsers (so anything NOT firefox, ie or safari) only happens if you're running windows.  If you're on Mac or some other OS, it directs to the working page.  I have asked about that, too.

Similar Messages

  • Using Reports from End User Console.

    I want to show the reports tab and the sub tabs in the end user console.
    I have copied the reports folder into the user folder and have modified the "End User Navigation" form , giving the URL of all the jsps.
    By this I can see the reports tab in the End user console, but when I click the tab, it redirects to the Admin console login page, and after logging into Admin console login page only I can navigate the other report sub tabs.
    Please let me know if there is any way to use the reports from End user console, without the secondary loging (into Admin console).

    Do you have to implement whole report TAB or do you want to run only one report.

  • Since installation of 8.1.2 I get an error message each time I use the browser--"a problem occurred with this webpage so it was reloaded". I have iPad 2.

    I Have an iPad 2. Since download of iOS 8.1.2 every time I use the browser--usually Google --this message comes up "a problem occurred with this webpage so it was reloaded". Touchpad also seems slow and jerky.

    Its not necessarily freezing - just being slow to build.
    May have something to do with this being a secured site - I an giving Opera a test run & this part of the apple site does not go into compressed load - but the non-secure parts of the site do.  The issue may be that some sites like apples just have too much unimportant junk on the screen because the designers are on an internal network a few offices away from the server and never see all the issues that com up.

  • Monitering web users at real time using weblogic console?

    Is there a way to monitor web users at real time using weblogic console.
    I want to see no. of active HTTP sessions, no. of HTTP requests at any
    point of time, opening and closing of a session...etc..
    thanks in advance

    See recent discussion in "servlet" newsgroup.
    Cameron Purdy, LiveWater
    "Manjunath Kalmani" <[email protected]> wrote in message
    news:[email protected]..
    Is there a way to monitor web users at real time using weblogic console.
    I want to see no. of active HTTP sessions, no. of HTTP requests at any
    point of time, opening and closing of a session...etc..
    thanks in advance

  • Redirecting based on web browser.

    Hey all,
    Hopefully somebody will have a soultion to my issue. Folloing my welcome page on my site I link directly to a page which promotes firefox as an alternative browser (instead of Explorer) to view the site. This looks really tacky and sends viewers away. However, when I didn't have the "Get Firefox" page, I would get people who would say that my site wouldn't load correctly.
    This brings me to my question. Does anybody out there know how to redirect specific browsers and preferably their versions to alternative pages? I know that this practice is generally frowned upon in the web design community. But alas, if possible I believe it would greatly benifit my site.
    I did find a website that described it at: http://www.quirksmode.org/js/detect.html . But I'm not Java Script literate, so I was unable to descipher enough information. Thanks in advance for reading this post, and for —hopefully—providing me with a soultion.
    Kind Regards,
    —Eric
    Ash Films
    http://web.mac.com/ekashley
    G4   Mac OS X (10.4.9)  

    You can either use JavaScript (JS) or PHP to achieve your ends. So you need to do some kind of scripting.
    This is from the web site you posted:
    <script type="text/javascript">
    <!--
    document.write('<p class="accent">You\'re using ' + BrowserDetect.browser + ' ' + BrowserDetect.version + ' on ' + BrowserDetect.OS + '!</p>');
    // -->
    </script>
    If you can understand that, then there is a chance you can program this yourself, and I'd be happy to help out.
    While the community does frown on showing different browsers different content, there are some cases, where design requires that slightly different HTML/JS/CSS be sent in order to achieve the same effect on the user's browser.
    One should not redirect to completely different content.
    You should also investigate the possibility of fixing the HTML so that it loads correctly. If it isn't your site, then you can first link to a page of your own that explains the problem and then sends folks on.
    (Btw. You wouldn't have this kind of problem if you used iWeb to publish your pages )

  • INS0009 error trying to use OWB Browser Assistant

    Hi!
    I'm trying to integrate a 9iAS installation on the same machine as an OWB installation using the Browser Assistant (I'm following the documentation instructions), but I'm having a couple of problems getting it working.
    When I get to the sysdba information page and click 'Next', I eventually get a INS0009 can't connect to the database error. The SID of the 9iAS installation is the default, iasdb, and I can tnsping that, so it appears to be working. (Also shows up under lsnrctl stat). I should note that I have combined the 9iAS - Infrastructure and 9i DB TNSListeners into one, and this appears to work fine.
    I can login to the IASDB database with no problems, as well.
    This shows up in listener.log when I try and connect, but nothing happens:
    16-FEB-2004 08:51:14 * (CONNECT_DATA=(SERVICE_NAME=iasdb)(CID=(PROGRAM=D:\oracle\OWB_DT\jdk\jre\bin\javaw.exe)(HOST=JHIGGS)(USER=jhiggs))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=3660)) * establish * iasdb * 0
    16-FEB-2004 08:51:14 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=iasdb)) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=3663)) * establish * iasdb * 0
    16-FEB-2004 08:51:14 * (CONNECT_DATA=(sid=iasdb)(CID=(PROGRAM=D:\oracle\OWB_DT\jdk\jre\bin\javaw.exe)(HOST=JHIGGS)(USER=jhiggs))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=3666)) * establish * iasdb * 0
    16-FEB-2004 08:51:14 * (CONNECT_DATA=(SID=iasdb)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=3669)) * establish * iasdb * 0
    16-FEB-2004 08:51:14 * (CONNECT_DATA=(SERVICE_NAME=iasdb)(CID=(PROGRAM=D:\oracle\OWB_DT\jdk\jre\bin\javaw.exe)(HOST=JHIGGS)(USER=jhiggs))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=3672)) * establish * iasdb * 0
    16-FEB-2004 08:51:14 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=iasdb)) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=3675)) * establish * iasdb * 0
    16-FEB-2004 08:51:14 * (CONNECT_DATA=(sid=iasdb)(CID=(PROGRAM=D:\oracle\OWB_DT\jdk\jre\bin\javaw.exe)(HOST=JHIGGS)(USER=jhiggs))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=3678)) * establish * iasdb * 0
    16-FEB-2004 08:51:14 * (CONNECT_DATA=(SID=iasdb)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=3681)) * establish * iasdb * 0
    And this has shown up in the past (but not in the most recent attempt) in OraDim.log:
    Fri Feb 13 16:04:51 2004
    ORA-03113: end-of-file on communication channel
    Can anyone help?
    Thanks a lot!

    Whoops. Problem fixed. I tried using the same user ("sys") and password in EM Console, and it didn't work. Tried system/manager and it worked in both.
    Problem solved!

  • Why is firefox 5 incompatible with talktalk email. i've been told to use another browser

    problem with sending emails on talktalk. They are very very slow and I get this messaage
    'The page isn't redirecting properly. Firefox has detected that the server is redirecting the request for the address in a ... (and then this message stops there)
    I contacted talktalk and they said Firefox 5 is incompatible with talktalk email and I should use another browser. Can I go back to Firefox 4, if not I'll have to quit Firefox
    Why is this problem happening

    Another TalkTalk user has a temporary fix posted here: <br />
    http://www.talktalk.co.uk/forums/showthread.php?t=185113#post2452787

  • Embed JWPlayer in webpage using flex.

    How to embed JWPlayer in webpage using flex...

    You could use the autoplay="false" tag but it will still allow the file to download in the background. No server savings in that method.
    Better method: Use a "Poster movie".
    The link to your source movie will not begin downloading until a visitor clicks on the poster.mov file.
    One of my pages as an example:
    http://homepage.mac.com/kkirkster/B/
    A different issue has come up in the last few weeks that involves the page code tags for PC users running Internet Explorer and the new M$ security update:
    http://developer.apple.com/internet/ieembedprep.html
    The embed tag is dead (by itself) as it doesn't even allow PC IE users to view QT content. The "better" object and embed (nested) still will work but, again, PC visitors using IE (about 80% of browser use) may see a pop-up message alerting them to ActiveX content in your page. Nothing makes them flee from your site quicker than an alert they don't understand.

  • S10 on SF v20z - video out and console redirection

    Hi,
    Is there a way to have both video out redirection and be able to do 'platform console' command in ALOM at the same time?
    by default, settings in eeprom are:
    output-device=screen
    input-device=keyboard
    obviously, console redirection doesn't work. (Well, actually it works fine while it boots, bios output gets sent on both places, the video out and console, until solaris boots ...)
    if I set
    output-device=ttya
    input-device=ttya
    I lose the video/keyboard switch functionality, but alom console redirection works fine.
    What am I missing? Is it possible to have both inputs and outputs active at the same time?
    Thanks for your time,
    Honza

    After installing, I needed to get into single user mode then run the Xfree86 configuration utility to properly detect and use the video card. I can't remember the exact command line, but it's something like /usr/X11/bin/xfconfig or something similar. After that, the video worked fine.

  • When I am using the browser for a while and try to use ANY search bar and hit the "search" button it does a whopping NOTHING is there anyway of keeping this from happening?

    Whenever I am using Firefox mobile - either regular, beta or aurora and go to search for something like through the Google search page and attempt to search for something the search bar does nothing and hitting the enter button instead doesn't do anything either. Is there a way to keep this from happening?

    Hi and thanks to not leaving the firefox user alone.
    Cor-el your answer is right as the madperson is and I already knew all these
    answer and I said that before I don’t use any antivirus and I always turn off my firewall from the moment I installed my Windows.
    I even turn off any automatic update for any of my software and I never let any unknown plugins or any thing like that be install without informing me. And if you know some things like Offline Storage and cookies must be to much more than usual and you have to clear them and delete them and I know so much more
    And if you want to know it fixed now. But I don’t know how?
    For understanding my problem read and research about Ixplorer.exe virus it is the same problem about the speed but the different is it doesn’t show any process in task manager like Ixplorer.exe virus
    Bt I have done some things but still I don’t know that’s why it is fixed or not
    First: I searched my system and removed any files have been crated on my system from two days ago since the problem happened.
    And then I used to go about the article in this page and did like this:
    http://answers.yahoo.com/question/index?qid=20080910101846AAazxN5
    but still I don’t know any thing about the problem.
    I can do so many things to fix but I am just curios if that is a virus why it just cut the speed when I am using the browser.
    Please if any one found the reason send me your information I like to know it will improve my knowledge however my problem is solved fro now.

  • Console redirection not working when ILOM is launched from Ops Center.

    Hi,
    I just installed Ops Center and added a few servers as assets. I'm having trouble to get console redirection when I start LOM Manager from within Ops Center.
    If I point my browser and login directly to a server's ILOM web interface, I get console redirection without problems. If I do it through the "Start LOM Manager" option in Ops Center, I get an error message: "Cannot launch Java application" when I try to start redirection.
    Is this normal behavior?
    Thank you for your help.

    Do you mean the 'Launch LOM console" from Action pane? If so, check your java version on the PC/laptop you are accessing OC from.
    What is your OC version?
    I am not finding any issue in accessing the ILOM console.

  • I Use Private Browsing Always, and Still Get Sanitize.js:136 Error

    All add-ons, extensions, plug-ins, and Firefox itself (v. 7.0.1) are up-to-date. I ALWAYS use Private Browsing, but still get the chrome://browser/content/sanitize.js:136 error. After "exiting" Firefox, Firefox refuses to close right away. I either wait for it to close, or I have to use the Task Manager to shut it down by force. Firefox is also using phenomenal amounts of Memory or CPU at times. Tonight, after closing Firefox out and literally 10 minutes later, I got the above Sanitize error. There have been other javascript errors ever since updating to v. 7 of Firefox, but I don't remember them offhand. I get MANY of them while using Facebook, but lately haven't even visited Facebook. I haven't seen any other users post this particular problem while using Private Browsing, so thought I'd give it a whirl. It's driving me insane and I just don't know what to do to correct the situation. Thanks for your replies!

    Hi, cor-el, and thanks for your reply. I do remember at one point in time (was quite a while ago) when the Plugin Container was a real problem. If I remember correctly the problem I was having, Plugin Container would still be running in Task Manager after closing out Firefox (sometimes even more than one Plugin Container). Looking over the link for Plugin-container you provided, I checked to see how mine are set and they are all set at "false."
    As far as Clear Recent History, I can't. My Firefox browser is set for Permanent Private Browsing and I see nothing to clear.
    Today, I've used Facebook and took screenshots of the js errors I get there. These errors virtually make Firefox unusable. By this, I mean, it locks up and becomes unresponsive. See attached.

  • Why is data being retained in the Firefox Internet cache when I always use Private Browsing ?

    OS Windows 7, using Firefox 33.1.1. I have set "Never remember history" so always use Private Browsing mode. I use CCleaner to delete unwanted files from my PC on each reboot, and notice that despite using private browsing mode CCleaner is deleting files every reboot from Firefox's Internet Cache. This morning, for example, there were 203 files with 2805 KB of data deleted by CC Cleaner from the Firefox Internet cache. What data is Firefox storing there from private browsing sessions?

    If you are in private browsing mode then the location for disk cache should be empty and show the same as the memory cache.
    Are you sure that this is the disk cache as there is more stored at the location where the disk cache is located?
    *C:\Users\&lt;user&gt;\AppData\Local\Mozilla\Firefox\Profiles\&lt;profile&gt;\
    Note that plugins may always store data on disk in their own cache.

  • Since I changed the operating system Windows 7 32bit to 64bit I can not use Firefox browser unless change the browser to safe mode.

    Since I changed the operating system Windows 7 32bit to 64bit I can not use Firefox browser unless change the browser to safe mode.When i start it the browser is not open and appears a message
    Mozilla Crash Reporter
    == Crash ID(s) ==
    20100611143157
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3)

    the 20100611143157 is an update which won't instal automatically on my notebook

  • How to disable Refresh,Reload in browser and user should not allow to multiple browser sessions ?

    Dear All,
    How to disable Refresh,Reload in browser and end user should not allow to multiple browser sessions in portal.Where we need to configure the settings or any code in masthead or any other component. My server version is 7.4 - SP5 .Please help us.
    Thanks for advance,
    BR,
    Durga Rao.

    Dear all,
    i am able to logoff the click refresh button on keyboard.I am using this code to log off the user into the portal.
    document.onkeydown = function(e)
      var key;
      if (window.event) key = event.keyCode
      else
      var unicode = e.keyCode ? e.keyCode : e.charCode
      key = unicode
      switch (key)
      { //event.keyCode
      case 116: //F5 button
        LSAPI.sessionPlugin.logoff();
      event.returnValue = false;
      key = 0; //event.keyCode = 0;
      return false;
      case 82: //R button
      if (event.ctrlKey)
    LSAPI.sessionPlugin.logoff();
      event.returnValue = false;
      key = 0; //event.keyCode = 0;
      return false;
      case 91: // ctrl + R Button
    LSAPI.sessionPlugin.logoff();
      event.returnValue= false;
      key=0;
      return false;
    Thanks.
    But i am unable to control the multiple windows opening the browser.So any one can tell me the how to block the new window and new tab/duplicate tab option.
    BR,
    Durga Rao.

Maybe you are looking for