Back to Content

PreferenceManager: reducedData property

files/en-us/web/api/preferencemanager/reduceddata/index.md

latest1.0 KB
Original Source

{{APIRef("User Preferences API")}}{{SeeCompatTable}}{{SecureContext_Header}}

The reducedData read-only property of the {{domxref("PreferenceManager")}} interface returns a {{domxref("PreferenceObject")}} used to override the user's preference for the reduced data of the site.

Valid reducedData {{domxref("PreferenceObject.value")}} settings are reduce and no-preference.

Value

A {{domxref("PreferenceObject")}} used to override the user's preference for the reduced data of the site.

Examples

Basic usage

This example demonstrates how to query the user's reduced data preference.

js
if (navigator.preferences.reducedData.value === "reduce") {
  // The user prefers you use less data.
} else {
  // The user has stated no preference regarding data use.
}

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}