I want to rewrite the path of an existing link tag.
I was able to rewrite the following with js, but the style is not reflected.

The style_new.css of the base expires, but the style_old.css is not effective.
Isn't it possible to rewrite only the path?

Applicable source code
$(window) .load (function () {
    var newCSS = document.createElement ("link");
    newCSS.type = 'text/css';
    newCSS.href = 'style_old.css';
    base = document.querySelector ('link [href * = "style_new.css"]');
    base.replaceWith (newCSS);
document.getElementsByTagName ('head') [0] .appendChild (newCSS);

Here too, the source was rewritten, but it was not reflected ...