A 301-redirect calls the target page directly whereas a JavaScript redirect loads a page first where JavaScript code is executed to redirect to the target page