User agent override prefs and %OS_SLICE% Topic is solved

Discussions about the development and maturation of the platform code (UXP).
Warning: may contain highly-technical topics.

Moderators: trava90, athenian200

User avatar
UCyborg
Fanatic
Fanatic
Posts: 179
Joined: 2019-01-10, 09:37

User agent override prefs and %OS_SLICE%

Unread post by UCyborg » 2020-04-16, 17:33

I noticed site-specific user agent override prefs support putting a kind of an environment variable - %OS_SLICE% - in the override string, which is then replaced by the name of the current operating system.

I thought general.useragent.override pref should support this too, for consistency, if for no other reason, but it doesn't. Is there a good reason for this?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35576
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: User agent override prefs and %OS_SLICE%

Unread post by Moonchild » 2020-04-16, 17:44

The general.useragent.override pref is a global override with a specific value. It isn't meant to be flexible and isn't governed by the same code as site-specific overrides.
If there is a specific reason to use the wallpaper override, which is always strongly discouraged in favour of using site-specific overrides, then there won't be any added value using a dynamic operating system slice, so there is no support for it and no reason to make that code more complex than it has to be.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
UCyborg
Fanatic
Fanatic
Posts: 179
Joined: 2019-01-10, 09:37

Re: User agent override prefs and %OS_SLICE%

Unread post by UCyborg » 2020-04-16, 17:59

OK, thank you for explaining.

Locked