Link to home
Start Free TrialLog in
Avatar of EnjoyNet
EnjoyNetFlag for United States of America

asked on

Website Redirection

Hi Experts,

I have IIS server.  I use a index file with both HTML and Java codes as following:

<meta http-equiv="Refresh" content="5; url=http://google.com" frameborder="0">

Open in new window


and

<!DOCTYPE html>
<html>
<body>
<script type="text/javascript">
// Javascript URL redirection
window.location.replace("http://google.com/");
</script>
</body>
</html>

Open in new window

Both redirections work for Chrome and IE, but not for Safari.

Do you have any suggestion?

Thank you very much in advance,

EN
Avatar of zephyr_hex (Megan)
zephyr_hex (Megan)
Flag of United States of America image

Just assign the value instead of using replace()

window.location = "http://google.com/";

Open in new window

Avatar of EnjoyNet

ASKER

I did.  But Safari still wouldn't work. Thanks
SOLUTION
Avatar of zephyr_hex (Megan)
zephyr_hex (Megan)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I did. unluck.  Thanks
Avatar of leakim971
location.replace and location.href work fine on Safari.
this line of code are not reached because another error in your javascript code
open the Safari debugger console to locate this error to fix it
Hi leakim971,

Could you please share your codes which work for Safari?

Thank you so much in advance,

EN
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Add IIS_IUSRS read right into Web folder.  Thank you so much.