Skip to content

Tag: detection

Detect mouse direction – JavaScript

This is how I detect the mouse direction and it works so good but it works only on Chrome, how I can make this compatible with other browsers (Firefox, Opera and at least ie8+ or ie9+). No jQuery please. Answer Stick with pageX and define oldx in a higher scope, otherwise it’s always zero FIDDLE

detecting a redirect with javascript – how?

Is there any way to detect whether a webpage is going to redirect me to another, knowing its URL? I mean the situation when you type URL in a text field and the script examines it for 3xx redirections. Answer Yes, you can do this quite easily in Javascript. It’d look something like: Unfortunately, this …