Konqueror Browser OR KHTML Engine Detection

/ Published in: JavaScript
Save to your folder(s)

This is a way to determine if the browser uses the KHTML engine or if it is the Konqueror Browser.

Copy this code and paste it in your HTML
  1. //KHTML engine?
  2. var is_khtml = (navigator.vendor == 'KDE')?true:false;
  3. //Konqueror?
  4. var is_konq = (navigator.vendor == 'KDE')||(document.childNodes)&&(!document.all)&&(!navigator.taintEnabled)?true:false;
  5. //KHTML or Konqueror?
  6. var is_k = (is_khtml || is_konq);

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.