Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

285
Views
JavaScript code detects IE 10 as supported version instead of as out of date

The code below generates alert "Your browser is supported" even if the version is IE 10. It works perfectly with browsers such as IE 9, 8 and 7. I need to ensure only version IE 11 is allowed. Is there really anything wrong with the code?

<script type="text/javascript">
    jQuery(document).ready(function($){
    // true on IE11
    // false on Edge and other IEs/browsers.        filters.hide();
    // Allow only IE 11 and other browsers like Chrome, Safar, firefox so on,
    // but never allow lower versions of IE starting IE 10.
    var div = document.createElement("div");
    div.innerHTML = "<!--[if lt IE 11]><i></i><![endif]-->";
    var isIeLessThan11 = (div.getElementsByTagName("i").length == 1);
    if (isIeLessThan11) {
      alert("Your web browser is out of date. Please complete this form using an approved browser, such as Edge, Chrome, Safari, or Firefox.");
    } else {
      alert("Your browser is supported");
    }
  });
</script>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

According to wikipedia, conditional comments are not supported in IE10 and above. https://en.m.wikipedia.org/wiki/Conditional_comment

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!