This forum has been archived. All content is frozen. Please use KDE Discuss instead.
The Discussions and Opinions forum is a place for open discussion regarding everything related to KDE, within the boundaries of KDE Code of Conduct. If you have a question or need a solution for a KDE problem, please post in the apppropriate forum instead.

KHTML Konqueror object detection - Simple way you can help

Tags: None
(comma "," separated)
JAB Creations
Registered Member
Posts
13
Karma
0
OS
I'm trying to add DOM based version detection of Konqueror to my site and would be happy to share how I detect all the other browsers with other people. It's the correct way to determine a browser engine/version in contrast to looking at the user agent which can easily be spoofed.

I'm also curious as to what the future plans are for Konqueror? Will the KHTML rendering engine only receive bug fixes or will more features be added?

To view my site's current DOM browser detection capability view the JavaScript at the following URL: jabcreations.com/scripts/init.js

To expand on this all I need is for a single page load from anyone who has a copy of Konqueror willing to load a page at my site at http://www.jabcreations.com/ and with the more DOM methods and property lists that I can collect (it's automated in the background) the better I can refine the version detection.
JAB Creations
Registered Member
Posts
13
Karma
0
OS
Thanks to people who went to my site and let it detect the various methods and properties. I'm still looking for more instances of Konqueror and only require a single page load to collect the information necessary for me to build DOM based detection of different versions of Konqueror.

Here are the updates to what I've determined so far that I can share with everyone...

1.) The item method seems to have been removed in item removed in Konqueror/4.6.0 from Konqueror/4.5.3. There were no other added/removed methods or properties associated with 4.5 or 4.6 version user agents at this time; this may end up being a reliable way to detect version 4.5 versus version 4.6.

2.) Someone visited using Konqueror/4.6.41 which my site incorrectly detected as Safari 5.0. That implies either the user agent was spoofed or the WebkitAnimationFillMode was added to KHTML at that version or somewhat earlier.

I updated the scripting to record the method and property lists if the string 'Konqueror' is found in the user agent. Except for this instance I would never bother with the navigator.userAgent property though it's relevant if I want to make sure newer versions don't detect as different browsers as it did with Konqueror/4.6.41.

Here is are the method and property lists for Konqueror/4.6.0 which is the latest version of Konqueror I've been able to reliably detect so far...

*** Methods ****
ATTRIBUTE_NODE
CDATA_SECTION_NODE
COMMENT_NODE
DOCUMENT_FRAGMENT_NODE
DOCUMENT_NODE
DOCUMENT_POSITION_CONTAINED_BY
DOCUMENT_POSITION_CONTAINS
DOCUMENT_POSITION_DISCONNECTED
DOCUMENT_POSITION_FOLLOWING
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
DOCUMENT_POSITION_PRECEDING
DOCUMENT_TYPE_NODE
ELEMENT_NODE
ENTITY_NODE
ENTITY_REFERENCE_NODE
NOTATION_NODE
PROCESSING_INSTRUCTION_NODE
TEXT_NODE
XPATH_NAMESPACE_NODE
addEventListener
align
all
appendChild
attributes
blur
childElementCount
childNodes
children
className
clientHeight
clientLeft
clientTop
clientWidth
cloneNode
compareDocumentPosition
contains
contentEditable
dir
dispatchEvent
document
firstChild
firstElementChild
focus
getAttribute
getAttributeNS
getAttributeNode
getAttributeNodeNS
getElementsByClassName
getElementsByTagName
getElementsByTagNameNS
hasAttribute
hasAttributeNS
hasAttributes
hasChildNodes
id
innerHTML
innerText
insertAdjacentHTML
insertBefore
isContentEditable
isSupported
lang
lastChild
lastElementChild
localName
namespaceURI
nextElementSibling
nextSibling
nodeName
nodeType
nodeValue
normalize
offsetHeight
offsetLeft
offsetParent
offsetTop
offsetWidth
onabort
onblur
onchange
onclick
ondblclick
ondragdrop
onerror
onfocus
onkeydown
onkeypress
onkeyup
onload
onmousedown
onmousemove
onmouseout
onmouseover
onmouseup
onmove
onreset
onresize
onscroll
onselect
onsubmit
onunload
ownerDocument
parentElement
parentNode
prefix
previousElementSibling
previousSibling
querySelector
querySelectorAll
removeAttribute
removeAttributeNS
removeAttributeNode
removeChild
removeEventListener
replaceChild
scrollHeight
scrollIntoView
scrollLeft
scrollTop
scrollWidth
setAttribute
setAttributeNS
setAttributeNode
setAttributeNodeNS
sourceIndex
style
tagName
textContent
title

*** Properties ***
KhtmlBackgroundClip
KhtmlBackgroundOrigin
KhtmlBackgroundSize
KhtmlBorderBottomLeftRadius
KhtmlBorderBottomRightRadius
KhtmlBorderHorizontalSpacing
KhtmlBorderRadius
KhtmlBorderTopLeftRadius
KhtmlBorderTopRightRadius
KhtmlBorderVerticalSpacing
KhtmlFlowMode
KhtmlMarginStart
KhtmlMarquee
KhtmlMarqueeDirection
KhtmlMarqueeIncrement
KhtmlMarqueeRepetition
KhtmlMarqueeSpeed
KhtmlMarqueeStyle
KhtmlPaddingStart
KhtmlUserInput
alignmentBaseline
background
backgroundAttachment
backgroundClip
backgroundColor
backgroundImage
backgroundOrigin
backgroundPosition
backgroundPositionX
backgroundPositionY
backgroundRepeat
backgroundSize
baselineShift
border
borderBottom
borderBottomColor
borderBottomLeftRadius
borderBottomRightRadius
borderBottomStyle
borderBottomWidth
borderCollapse
borderColor
borderLeft
borderLeftColor
borderLeftStyle
borderLeftWidth
borderRadius
borderRight
borderRightColor
borderRightStyle
borderRightWidth
borderSpacing
borderStyle
borderTop
borderTopColor
borderTopLeftRadius
borderTopRightRadius
borderTopStyle
borderTopWidth
borderWidth
bottom
boxSizing
captionSide
clear
clip
clipPath
clipRule
color
colorInterpolation
colorInterpolationFilters
colorProfile
colorRendering
content
counterIncrement
counterReset
cssText
cursor
direction
display
dominantBaseline
emptyCells
enableBackground
fill
fillOpacity
fillRule
filter
float
floodColor
floodOpacity
font
fontFamily
fontSize
fontSizeAdjust
fontStretch
fontStyle
fontVariant
fontWeight
getAttribute
getPropertyCSSValue
getPropertyPriority
getPropertyValue
glyphOrientationHorizontal
glyphOrientationVertical
height
imageRendering
item
kerning
left
length
letterSpacing
lightingColor
lineHeight
listStyle
listStyleImage
listStylePosition
listStyleType
margin
marginBottom
marginLeft
marginRight
marginTop
marker
markerEnd
markerMid
markerStart
mask
maxHeight
maxWidth
minHeight
minWidth
opacity
orphans
outline
outlineColor
outlineOffset
outlineStyle
outlineWidth
overflow
overflowX
overflowY
padding
paddingBottom
paddingLeft
paddingRight
paddingTop
pageBreakAfter
pageBreakBefore
pageBreakInside
parentRule
pointerEvents
position
quotes
removeAttribute
removeProperty
right
scrollbarArrowColor
scrollbarBaseColor
scrollbarDarkshadowColor
scrollbarFaceColor
scrollbarHighlightColor
scrollbarShadowColor
scrollbarTrackColor
setAttribute
setProperty
shapeRendering
size
src
stopColor
stopOpacity
stroke
strokeDasharray
strokeDashoffset
strokeLinecap
strokeLinejoin
strokeMiterlimit
strokeOpacity
strokeWidth
tableLayout
textAlign
textAnchor
textDecoration
textIndent
textOverflow
textRendering
textShadow
textTransform
top
unicodeBidi
unicodeRange
verticalAlign
visibility
whiteSpace
widows
width
wordSpacing
wordWrap
writingMode
zIndex

For those who are curious how to easily determine the differences between lists of previous versions to lists of newer versions I use WinMerge. Yes, I'm still using XP at the moment though plan to migrate to Linux eventually once I find the distro most conductive to production.

For those looking for cross-platform file comparison software who are also interested in what I'm doing here is a list I found on Wiki: DiffMerge, Eclipse Compare, Ediff, Ellié Computing Merge, Guiffy SureMerge, IntelliJ IDEA Compare, jEdit JDiff plugin, KDiff3, Kompare, Lazarus Diff, Meld, Perforce P4Merge, Pretty Diff, Tkdiff and there are some more...I think those are all freeware.

A couple of links for those curious about the DOM....

DOM Explorer II - You can visually explore the DOM in any browser. Note that my site's global JavaScript variables and functions will show up though there are options to toggle the various types.
http://www.jabcreations.com/web/javascr ... explorer-2

This link shows the lists detected for each browser including Konqueror.
http://www.jabcreations.com/web/javascr ... onsole-dom

I still need more information to detect various versions of Konqueror and I'll share the information as more lists of methods and properties become available for me to compare. Thanks for the help so far! :)
User avatar
tyreed
Registered Member
Posts
40
Karma
0
OS
visiting this guys site will Totally trash you Firefox (Nightly 24), pulseaudio, kwin etc on openSuSE Linux and KDE 4.10.2.
It's not permenent, but you'll have to Ctrl+W 'his tab' as the right side of the tab is 'removed' and you wont be able to 'x' out.
JAB Creations
Registered Member
Posts
13
Karma
0
OS
Hi, I'm this guy and I pay attention to when people reply to threads I participate in. What exactly went wrong? It would have been better to simply send me a private message. Also keep in mind you're using a nightly build, that's the absolute cutting edge and they're not intended for everyday use.


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot]