Window.location.reload is falsely reported as a deprecated function

I’m getting a javascript:S1874 (Deprecated APIs should not be used) alert on a call to window.location.reload for JavaScript used in the browser.

MDN notes that the standard form includes no parameter but that including a nonstandard boolean parameter can make a difference for Firefox users.

MDN gives no indication that this function is deprecated or what if anything it has been replaced with.

Why does SonarQube (Version 8.9.5 (build 50698)) flag it as deprecated?

1 Like