From aab8aa0aa05cabc09b86beb86664b2c9e1257b01 Mon Sep 17 00:00:00 2001 From: Stefan Giehl Date: Tue, 12 Nov 2024 13:49:16 +0100 Subject: [PATCH] Better explain client hints in readme fixes #7909 --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 48d34b1031..c4cb76bd61 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,11 @@ use DeviceDetector\Parser\Device\AbstractDeviceParser; AbstractDeviceParser::setVersionTruncation(AbstractDeviceParser::VERSION_TRUNCATION_NONE); $userAgent = $_SERVER['HTTP_USER_AGENT']; // change this to the useragent you want to parse -$clientHints = ClientHints::factory($_SERVER); // client hints are optional + +// Client Hints are optional +// If you want to use them your server must announce that it supports client hints, using the Accept-CH header to specify the hints that it is interested in receiving. +// See e.g. https://developer.mozilla.org/en-US/docs/Web/HTTP/Client_hints +$clientHints = ClientHints::factory($_SERVER); $dd = new DeviceDetector($userAgent, $clientHints);