|
|
|
@ -1,11 +1,9 @@ |
|
|
|
|
# fp |
|
|
|
|
wow~ ⊙o⊙ Such a smart fingerprint generator that I don't even need a cookie anymore~ |
|
|
|
|
Let fp work with Cookie, make it stable and reliable! |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## What is fp? |
|
|
|
|
fp is a smart js which can generate an unique 'fingerprint' for each visitor basing on visitor's device and your domain.</br> |
|
|
|
|
With the help of fp you can easily identify who is visiting your website.</br> |
|
|
|
|
Basing on fp, it becomes possible to release your whole site from cookie which is considered unsafe for user's privacy. |
|
|
|
|
fp is a concise web front-end solution to generate an unique 'fingerprint' for each visitor basing on visitor's device and browser. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Quick start |
|
|
|
@ -14,14 +12,34 @@ Basing on fp, it becomes possible to release your whole site from cookie which i |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## How to use fp? |
|
|
|
|
To use fp, you must include the fp.js first.</br> |
|
|
|
|
The generated fingerprint is stored in global variabel fp.</br> |
|
|
|
|
To use fp, you must include the fp.js or fp.min.js first. |
|
|
|
|
A simple example: |
|
|
|
|
```html |
|
|
|
|
<script type="text/javascript" src="https://cdn.yimian.xyz/fp/fp.min.js"></script> |
|
|
|
|
<script type="text/javascript">alert(fp);</script> |
|
|
|
|
<script type="text/javascript" src="./fp.min.js"></script> |
|
|
|
|
<script type="text/javascript"> |
|
|
|
|
fp(function(myFp){ |
|
|
|
|
alert(myFp); |
|
|
|
|
}); |
|
|
|
|
</script> |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
## Advanced Usage |
|
|
|
|
```html |
|
|
|
|
<script type="text/javascript" src="./fp.min.js"></script> |
|
|
|
|
<script type="text/javascript"> |
|
|
|
|
fp(function(myFp, acc, detail, createdTime, timeUsed){ |
|
|
|
|
alert('My fp: ' + myFp); |
|
|
|
|
alert('Accuracy: ' + acc); |
|
|
|
|
alert('fp Details: ' + detail); |
|
|
|
|
alert('fp Created Time: ' + createdTime); |
|
|
|
|
alert('Time Usage to calculate: ' + timeUsed); |
|
|
|
|
}); |
|
|
|
|
</script> |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
## CDN |
|
|
|
|
- China: `https://cdn.yimian.xyz/fp/fp.min.js` |
|
|
|
|
|
|
|
|
|
## Background |
|
|
|
|
This project is developed from https://github.com/Valve/fingerprintjs |
|
|
|
|
This project is developed from https://github.com/mestarshine/fingerprint2js |
|
|
|
|
|
|
|
|
|