Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content

Preserve the user URL preferences for subsequent requests

Israel Yago Pereira requested to merge preserve-preferences-cookies into master

This MR makes the URL preferences be saved for each subsequent request

url_param

The user preferences would be updated according to the URL param contents.

How to test

The current behavior

The following steps describe how to reproduce the current behavior. Do not follow them in this MR branch

  1. Set your theme to dark mode
  2. Go to the /preferences page
  3. Copy the preferences URL
  4. Open an anonymous browser tab
  5. Paste the preferences URL and update the last q=%s to q=dog
  6. At the search results page, confirm that you are in dark mode
  7. Go to the images page, confirm that you lost the dark mode

Since we expect that our preferences would be saved, the lost of the dark mode on the last step is a weird experience.

The behavior of this MR

  1. After git checkout preserve-preferences-cookies, run sudo make run
  2. Set your theme to dark mode
  3. Go to the /preferences page
  4. Copy the preferences URL
  5. Open an anonymous browser tab
  6. Paste the preferences URL and update the last q=%s to q=dog
  7. At the search results page, confirm that you are in dark mode
  8. Go to the images page, confirm that you still have the dark mode

Better experience

Now the user can set the "URL preference" as a default search engine (that's why we have the q=%s part) and still have it's preferences saved and used again and again for each use on the website

Relates to e/backlog#1154 (closed) and https://github.com/searx/searx/issues/2958

Merge request reports

Loading