3 Replies Latest reply: Mar 5, 2012 10:56 PM by Mahmoud_Rabie RSS

    How to prevent old-browser user from login

    Mahmoud_Rabie
      Dear Experts,

      I have validation functions which need to be by JS. However, this functions fail when users logged in by old web browsers.

      Is there a way to detect the browser version (I like firefox 9) and force users to use this certain browser. Of course, this way will not by JS.

      Best Regards
        • 1. Re: How to prevent old-browser user from login
          InoL
          You can create a Before Header PL/SQL page process to check the browser. E.g. to prevent IE:
          if owa_util.get_cgi_env('HTTP_USER_AGENT') like '%MSIE%' then
             raise_application_error(-20000,'You cannot use IE');
          end if;
          The process error message is then #SQLERRM#.
          • 2. Re: How to prevent old-browser user from login
            fac586
            mahmoudrabie wrote:
            Dear Experts,

            I have validation functions which need to be by JS. However, this functions fail when users logged in by old web browsers.
            APEX has basic browser requirements.
            Is there a way to detect the browser version (I like firefox 9) and force users to use this certain browser. Of course, this way will not by JS.
            This approach&mdash;known as <em>browser sniffing</em>&mdash;is not effective. User agent identifiers can easily be modified by end users, and your code will quickly become swamped by trying to cope with a multitude of browsers and versions.

            Instead use feature detection to identify whether the browser supports the constructs used in your code, and graceful degradation to provide alternatives where possible. See the sample chapter from this book for an introduction to these concepts, and this article for more details.

            Finally, note that all browser-side validation must be repeated server-side in APEX or the database, as browser-based validation can be circumvented by determined users.
            • 3. Re: How to prevent old-browser user from login
              Mahmoud_Rabie
              Thank you so much fac586 and InoL

              Edited by: mahmoudrabie on Mar 5, 2012 8:55 PM