Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

287
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda