Delaying Execution of jQuery Function

Fingerprintjs2 readme says:

You should not run fingerprinting directly on or after page load. Rather, delay it for a few milliseconds to ensure consistent fingerprints. See #307, #254, and others.

Here is a test case to delay the execution of hello world jQuery program.

<title>jQuery Delay</title>

<script type="text/javascript" src=""></script>

<script type="text/javascript">

    function showHello() {
       $("#msgid").html("This is Hello World by JQuery");
    setTimeout(showHello, 2000);


This is Hello World by HTML

<div id="msgid"></div>


This will delay the execution of showHello function by 2 seconds. Using delay to get the fingerprint will result in consistent values when the backend is hit several times.

Related Articles

Create your own user feedback survey