I currently have res.redirect('/login') but this will not work for browsers not supporting pushState. So I need a way to detect the user browser so that I can redirect with res.redirect('/#login') for browsers not supporting pushState.
How can I detect if the user browser supports pushState or not in Nodejs?
I currently have res.redirect(‘/login’) but this will not work for browsers not supporting pushState.
Share
You could implement ua-parser and then use the, Can I use… matrix to build which browser versions support it. It’s not very ideal but I can’t think of another way to feature detect from node.