The Yo-Yo Attack: Bankrupting Cloud Infrastructure
A comprehensive guide to the Yo-Yo attack, an Economic Denial of Sustainability (EDoS) technique that targets auto-scaling mechanisms in cloud environments.
Feb 28, 2026Cybersecurity
JavaScript is one of the most powerful technologies on the web — responsible for interactivity, analytics, UI rendering, and more.
But its power also makes it a tool for tracking users, intentionally or unintentionally.
So can you be tracked through JavaScript?
Yes — and in more ways than most people realize.
This article breaks down how JavaScript tracking works, what techniques are used, what data can be collected, and how you can mitigate the risks.
Technical examples included.
JavaScript runs directly in the user's browser with permission to access:
Even without cookies, JavaScript can build a unique fingerprint of your device.
Below are the most widely used methods — from benign analytics to invasive fingerprinting.
Cookies let websites store small bits of information about you — sessions, analytics IDs, preferences, etc.
JavaScript can read and write cookies:
// Write a cookie
document.cookie = "userID=12345; path=/; max-age=86400";
// Read cookies
console.log(document.cookie);Cookies are shared with servers on every request, enabling tracking across sessions.
These are not sent to the server automatically, but they persist indefinitely unless manually cleared.
// Save tracking identifier
localStorage.setItem("uid", crypto.randomUUID());
// Read it later
const uid = localStorage.getItem("uid");IndexedDB is even harder to detect and is sometimes abused for “evercookie” persistence.
const req = indexedDB.open("trackerDB", 1);
req.onsuccess = () => {
let db = req.result;
// store a unique ID
let tx = db.transaction("store", "readwrite");
tx.objectStore("store").put({ id: "trackingID", value: 999 });
};Because clearing IndexedDB is uncommon, it becomes a stealth storage mechanism.
One of the most effective JavaScript tracking techniques.
JavaScript draws hidden text or shapes on an HTML <canvas>, then extracts the rendering output.
Rendering differences between:
…produce a unique hash.
Example:
function getCanvasFingerprint() {
const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
ctx.textBaseline = "top";
ctx.font = "16px Arial";
ctx.fillText("BrowserFingerprintTest", 2, 2);
return canvas.toDataURL();
}
console.log(getCanvasFingerprint());This output is hashed and used as a fingerprint.
Based on how your audio stack processes frequencies.
let context = new OfflineAudioContext(1, 44100, 44100);
let osc = context.createOscillator();
osc.type = "triangle";
osc.frequency.value = 10000;
osc.connect(context.destination);
osc.start(0);
context.startRendering().then(buffer => {
console.log(buffer.getChannelData(0).slice(0, 10));
});Each device generates different floating-point patterns.
JavaScript can gather dozens of attributes including:
Example snippet:
const fingerprint = {
ua: navigator.userAgent,
lang: navigator.language,
rez: `${screen.width}x${screen.height}`,
tz: Intl.DateTimeFormat().resolvedOptions().timeZone,
cores: navigator.hardwareConcurrency,
gpu: (gl => gl.getParameter(gl.RENDERER))(document.createElement('canvas').getContext('webgl'))
};
console.log(fingerprint);Combined, these form a highly unique profile.
JavaScript cannot directly read your IP address, but it can query a STUN server via WebRTC — without permission.
WebRTC Leak Example:
let pc = new RTCPeerConnection({ iceServers: [] });
pc.createDataChannel("");
pc.createOffer().then(offer => pc.setLocalDescription(offer));
pc.onicecandidate = event => {
if (event && event.candidate) {
console.log(event.candidate.candidate); // contains your local IP
}
};Even with a VPN, WebRTC can reveal local network info unless blocked.
These techniques are used by:
Even with cookies blocked, JavaScript fingerprinting still works.
This is why GDPR and major browsers are cracking down on cross-site JS tracking methods.
Below are the most effective mitigation strategies.
Tools like NoScript, uMatrix, or LibreWolf can block JavaScript entirely — but most websites break.
Use tools like:
These prevent invisible trackers from loading.
To prevent IP leaks:
about:config → media.peerconnection.enabled = falseClear:
Brave, Firefox, and Safari support “clear on exit”.
A VPN alone does not stop JS tracking — but when combined with anti-fingerprinting, privacy improves significantly.
Yes — primarily through:
If two sites embed the same tracker (e.g., Google, Meta, TikTok), they can correlate your activity even without cookies.
Can you be tracked through JavaScript? Absolutely. JavaScript enables cookies, fingerprinting, WebRTC leaks, localStorage tracking, and cross-site profiling. Modern trackers collect device info, GPU details, audio graph signatures, browser configurations, and network metadata — often without user awareness. Learn the technical methods and practical prevention strategies here.
Love it? Share this article: