mdn / yari

The platform code behind MDN Web Docs
Mozilla Public License 2.0
1.19k stars 509 forks source link

Search fails when cookies are disabled #10266

Open Richard-Mlynarik opened 10 months ago

Richard-Mlynarik commented 10 months ago

Summary

Any search on MDN fails when cookies are blocked.

Only result is a page with nothing (aside from site boilerplate stuff, and gigabytes of Javascript) <h1>No query, no results.</h1>

Same outcome using any of

URL

https://developer.mozilla.org/en-US/search?q=cookies

Reproduction steps

  1. Type stuff into search box
  2. Press enter
  3. Fail

Expected behavior

Basic, fundamental, elementary, state-free site functionality should never rely on local storage of any data at all.

Actual behavior

<h1>No query, no results.</h1>

Device

Desktop

Browser

Firefox

Browser version

Stable

Operating system

Mac OS

Screenshot

You really shouldn't need this... no cookie no results no cookies allowed

Anything else?

No response

Validations

Richard-Mlynarik commented 10 months ago

I guess it might technically be browser local storage, not cookies. Blocking the latter in Firefox rightly blocks the former. Burn them all!

Browser console log:

Cookie “” has been rejected by user set permissions. 2 search Unable to read theme from localStorage DOMException: The operation is insecure. search:1:394 Cookie “” has been rejected by user set permissions. ga.js Cookie “” has been rejected by user set permissions. main.70c8cb70.js Request to access cookies or storage on “https://developer.mozilla.org/en-US/search?q=cookies” was blocked because of custom cookie permission.

Uncaught DOMException: The operation is insecure. main.70c8cb70.js:2 Cookie “” has been rejected by user set permissions. apple-touch-icon.6803c6f0.png Cookie “” has been rejected by user set permissions. favicon-48x48.cbbd161b.png