Using HTML+CSS to track mouse movement

Using HTML+CSS to track mouse movement

As users become more privacy-conscious and take more precautions against online tracking, they are turning to ad blockers and script blockers to block JavaScript tracking scripts. Now, researchers have discovered a new way to use HTML and CSS to track the mouse movements of website visitors and bypass tracking protection.

1 New attack techniques

Most online tracking is done through JavaScript scripts that are loaded into websites and ads, which allows advertisers and websites to track where you go online, how you use websites, or other online behaviors.

These scripts can be blocked using an ad blocker, browser tracking protection (like Firefox’s content blocking), or by blocking JavaScript altogether.

Content Blocking in Firefox

Researchers have discovered a new way to track website visitors' mouse movements on web pages without using any JavaScript, using only HTML and CSS, making this tracking very difficult to block.

Security researcher Davy Wybiral demonstrated on Twitter how a website can use HTML and CSS to observe mouse movements in one browser window in another browser window.

Wybiral achieved this by creating a grid of HTML DIVs that leveraged CSS: when the mouse moved over a box on the grid, the hover selector could request a new background image. Because the image requests are done in the background, the browser does not indicate that a connection is being made, so all requests are hidden from the user.

HTML source code

When a user hovers over a box and requests a new background image, the script records the mouse hover position. A user in another browser can then use the /watch URL to monitor in real time.

This technique can be used for a variety of things, including identifying hot spots on a website and studying user interfaces. In addition, the technology can be used to perform dynamic (gait) analysis and gain insights into other visitor behavioral characteristics.

The researchers also said that in addition to the hover selector, other selectors can be used to track browser behavior.

2 Other CSS tracking techniques

The method discovered by Wybiral isn't the only one showing how CSS and HTML can be used to track website users.

Last year, a project called CrookedStyleSheets was released that allows websites to collect user information such as screen resolution, the browser being used, information about when the user clicks on a link, and infer what operating system the user is using based on supported fonts.

As with Wybiral's approach, this is all done using HTML and CSS, with no JavaScript used.

Summarize

The above is what I introduced to you about using HTML+CSS to track mouse movement. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time!

<<:  We're driving IE6 to extinction on our own

>>:  jquery+springboot realizes file upload function

Recommend

Detailed steps for setting up a nexus server

1. The significance of building nexus service As ...

mysql5.5 installation graphic tutorial under win7

MySQL installation is relatively simple, usually ...

Some CSS questions you may be asked during an interview

This article is just to commemorate those CSS que...

An audio-visual Linux distribution that appeals to audiophiles

I recently stumbled upon the Audiovisual Linux Pr...

MySQL high availability cluster deployment and failover implementation

Table of contents 1. MHA 1. Concept 2. Compositio...

Solution to the problem of large font size on iPhone devices in wap pages

If you don't want to use javascript control, t...

Web Design Experience

<br />The author used to be a novice in web ...

Detailed explanation of script debugging mechanism in bash

Run the script in debug mode You can run the enti...

mysql5.5.28 installation tutorial is super detailed!

mysql5.5.28 installation tutorial for your refere...

Detailed code examples of seven methods for vertical centering with CSS

When we edit a layout, we usually use horizontal ...

VUE implements timeline playback component

This article example shares the specific code of ...

Detailed tutorial on running Tomcat in debug mode in IDEA Maven project

1. Add the following dependencies in pom.xml <...

Native JS to achieve sliding button effect

The specific code of the sliding button made with...