Links redirects using scripts vs 301 redirects vs positioning

Hello,

this is a followup question form this topic:

In short: having big library of articles we have managed to automate redirects using simple script in the header (and avoided a lot of manual implementation via WebFlow settings for 301s). Works very well and simply uses:

window.location =“new href”

But of course this method doesn’t officially send 301 message. :frowning:

Our concern is if this solution will affect the boots - will they follow to the new location of the content (via script translation) or this may bounce back for some reasons and ruin our positioning?

Thanks!

If you care about SEO and page rank, do a 301.