How the code would look for the redirect for OS and Browser?

There is code:
<script type="text/javascript">
if (window.navigator.userAgent.indexOf("Mac") != -1) location = "http://localhost/mac";

This condition in which if a person Mac it redirects to localhost/mac

1) will look Like code will be conditions that a person Mac and Firefox?
2) How the code would look would be with the return conditions if one has no Mac and Firefox?
March 23rd 20 at 19:17
0 answer

Find more questions by tags JavaScript