How to change the UserAgent in Firefox

Discussion in 'other software & services' started by Mr.X, Nov 29, 2023.

  1. Mr.X

    Mr.X Registered Member

    Joined:
    Aug 10, 2013
    Posts:
    5,252
    Location:
    .
    As the title says... Specially on problematic sites such as YouTube :mad:
     
  2. Mr.X

    Mr.X Registered Member

    Joined:
    Aug 10, 2013
    Posts:
    5,252
    Location:
    .
    According to @nicolaasjan 's post I've just read after creating this thread :D, it says and quote:

    To change the user agent for YouTube:
    • Go to `about:config`.
    • Paste `general.useragent.override.youtube.com` in the box (without the quotes).
    • Check `String`.
    • Click on `+`.
    • Enter this in the box:
    Code:
    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
    • Click the check-mark.

    But I can't guarantee it will keep working, as others have seen the page load slowing on Chrome as well.


    Doesn't uBO counter it for you?
    If not, carefully follow the instructions here.

    You could also test these filters:
    Code:
    www.youtube.com##+js(nano-stb, resolve(1), *, 0.001)
    www.youtube.com##+js(set, yt.config_.EXPERIMENT_FLAGS.ab_pl_man, false)
    www.youtube.com##+js(set, yt.config_.EXPERIMENT_FLAGS.web_enable_ab_rsp_cl, false)
    ||googlevideo.com/videoplayback$xhr,3p,method=get,domain=www.youtube.com
     
  3. Mr.X

    Mr.X Registered Member

    Joined:
    Aug 10, 2013
    Posts:
    5,252
    Location:
    .
    After watching the domain name in this flag (red letters):
    Code:
    general.useragent.override.youtube.com
    
    I decided to try the following flag + string in order to make sure FF can override the user agent for specific sites:
    Code:
    general.useragent.override.whatismybrowser.com
    +
    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
    
    Then I went to
    Code:
    https://www.whatismybrowser.com/detect/what-is-my-user-agent
    
    I've got this in return:
    Code:
    Mozilla/5.0 (Windows NT 6.1; rv:109.0) Gecko/20100101 Firefox/115.0
    
    It can't override for specific sites.




    Adding a string for a general override works though:
    Code:
    general.useragent.override
    +
    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
    
    gives
    Code:
    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
    
     
  4. Brummelchen

    Brummelchen Registered Member

    Joined:
    Jan 3, 2009
    Posts:
    6,289
    have you considered locale issues instead user agent? i dont have any issues with firefox and windows 10/11 on youtube - instant loading, no timeout, what ever.
     
  5. nicolaasjan

    nicolaasjan Registered Member

    Joined:
    Sep 23, 2018
    Posts:
    985
    Location:
    The Netherlands
    You're absolutely right. :thumb:
    I totally missed that change (in the past it was possible and it still works in the Pale Moon browser).
    See:
    https://www.ghacks.net/2019/12/11/m...c-user-agent-override-option-from-firefox-71/.
    https://bugzilla.mozilla.org/show_bug.cgi?id=1513574.

    For site-specific switches you can use this extension.
     
    Last edited: Dec 3, 2023
  6. chrisretusn

    chrisretusn Registered Member

    Joined:
    Jun 16, 2004
    Posts:
    1,724
    Location:
    Philippines
    I use this extension, it is quite useful. I only use it for one thing. Set the OS icon on LinuxQuestions.org to Slackware.
    I added to my setting in Custom Mode to tell WhatIsMyBrowser.com I am using Window with Safari.
    Code:
    {
      "www.linuxquestions.org": "${userAgent} Slackware",
      "whatismybrowser.com": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Safari/537.36"
    }
     
  7. Mr.X

    Mr.X Registered Member

    Joined:
    Aug 10, 2013
    Posts:
    5,252
    Location:
    .
    Thanks. Installed and working fine.
     
  8. Mr.X

    Mr.X Registered Member

    Joined:
    Aug 10, 2013
    Posts:
    5,252
    Location:
    .
    User-Agent Switcher and Manager

    Is it possible to make Firefox change the user agent automatically at start up only for YouTube?
     
  9. chrisretusn

    chrisretusn Registered Member

    Joined:
    Jun 16, 2004
    Posts:
    1,724
    Location:
    Philippines
    As you can see by my post above, which works only for two sites, you can set the extension to work only on one web site. For example I would enter this for Chrome 119:
    Code:
    {
      "www.youtube.com": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36"
    }
     
  10. nicolaasjan

    nicolaasjan Registered Member

    Joined:
    Sep 23, 2018
    Posts:
    985
    Location:
    The Netherlands
    Yes, in Options paste this in "Custom":
    Code:
    {
      "youtube.com": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.6099.63 Safari/537.36"
    }
    Then press "Save" at the bottom. :)

    (screenshot)
     
    Last edited: Dec 6, 2023
  11. Mr.X

    Mr.X Registered Member

    Joined:
    Aug 10, 2013
    Posts:
    5,252
    Location:
    .
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.