Redirect not working

hello, i have the following code, it’s works fine in windows and linux, but in a machintosh it wont redirect at all.

var whatever = “<?= $caminho ?>”;

please help

Try this

window.location = whatever;
return false;

i alredy tried but it wont work, only in macintosh computer

try window.location.href =whatever;