JavaScript Restrictor
Browser extension that improves privacy and security
Loading...
Searching...
No Matches
wrappingS-DM.js File Reference

Wrappers for navigator.deviceMemory property. More...

Detailed Description

Wrappers for navigator.deviceMemory property.

See also
https://xhr.spec.whatwg.org/
Author
Copyright (C) 2019 Libor Polcak
Copyright (C) 2021 Matus Svancar
License:
SPDX-License-Identifier: GPL-3.0-or-later
License:
SPDX-License-Identifier: MPL-2.0

This file contains a wrapper for navigator.deviceMemory.

The goal is to prevent fingerprinting by modifying the return value of the navigator.deviceMemory parameter.

This wrapper operates with three levels of protection:

  • (0) - return random valid value from range [0.25 - real value]
  • (1) - return random valid value from range [0.25 - 8]
  • (2) - return 4

These approaches are inspired by the algorithms created by Brave Software available here.