This is a bug report for Stack Exchange frontend code (sstatic.net); don't close it as off-topic!

Script error: Missing polyfill for replaceAll

On older browsers, the site is broken. I can't click on any button. There is no String.prototype.replaceAll:


There is an error on this script here:


Uncaught TypeError: l.replaceAll is not a function
    at a (stub.en.js?v=17e20b4b4731:formatted:55)
    at full.en.js?v=3708f79bf934:formatted:2365
    at Object.266 (full.en.js?v=3708f79bf934:formatted:2493)
    at __webpack_require__ (full.en.js?v=3708f79bf934:formatted:11524)
    at a (full.en.js?v=3708f79bf934:formatted:138)
    at e (full.en.js?v=3708f79bf934:formatted:11676)
    at full.en.js?v=3708f79bf934:formatted:11684
    at full.en.js?v=3708f79bf934:formatted:11726
    at full.en.js?v=3708f79bf934:formatted:11728

[email protected] needs to be updated. See String.prototype.replaceAll not polyfilled #13701:


  • 1
    Probably related to this: JavaScript no longer works all of a sudden | We're Migrating our JavaScript
    – hkotsubo
    Dec 14, 2021 at 0:59
  • @hkotsubo Yea, it's probably because of that site JS update.
    – XP1
    Dec 14, 2021 at 1:05
  • 2
    I can confirm that adding a replaceAll polyfill fixes the website. It's a simple fix. No other script errors. Works in old browsers again.
    – XP1
    Dec 14, 2021 at 1:38
  • @XP1, how does one add such a PolyFill? From the console? Dec 14, 2021 at 12:47
  • Test snippet: developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/…
    – Rob
    Dec 14, 2021 at 14:02
  • 3
    Just deployed a fix, should be sorted now. Let me know if you continue to have problems. Dec 14, 2021 at 17:22
  • @Gerard H. Pille, I noticed something was wrong (couldn't vote) a few days ago, but I was too lazy to investigate. I assumed a major website would have this fixed before I would. :S Adding the polyfill in the console wouldn't work unless it was done before the script loads. It would have to be a user script or extension that loads before the script. However, what I did differently was intercept the HTTPS traffic and inject my own modified JS file instead of using the server's JS file. I used Fiddler web debugging proxy, so all browsers will receive my modified JS. No need console or extension.
    – XP1
    Dec 14, 2021 at 20:31
  • @Benjamin Hodgson, thanks, currently typing in my old browser. :)
    – XP1
    Dec 14, 2021 at 20:32
  • @XP1 if you use Chrome, it can be as simple as adding a local override in the meantime too Dec 14, 2021 at 21:29


You must log in to answer this question.

Browse other questions tagged .