Is there any way that I could tell if my site is being accessed by an instance of webbrowser control? Would it be possible to identify it by the user agent w/php? Or maybe some javascript hack? Or is it 100% identical to the regular IE from the server side?
It seems that a specific error is raised when anything is assigned to window.external
. So a check could be something like
const isWebBrowserControl = () => {
try {
window.external = window.external
return false
} catch (error) {
if (error.message === 'I don\'t remember this. Some specific error message.') {
return true
}
}
This is a potentially "destructive" check, though. But I really don't feel it would cause any problem.
Just a stupid idea, but couldn't you just compare window.outerHeight
with window.innerHeight
, measure the expected difference for IE and if its not then its the WebBrowser Control?
Thats hacky as hell, but could work for most cases. There are also other things you could try to do, things that would work in a certain way in IE but probably won't work in a WebBrowser Control.
For example:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With