Hi Everyone I have created a mobile friendly site for myself and want to redirect visitors if they find it with a resolution of more than 600 pixels to my main site.
Having Problems With Javascript Redirect
5
Hi Everyone
I have created a mobile friendly site for myself and want to redirect visitors if they find it with a resolution of more than 600 pixels to my main site.
The script I'm using is this:
<script language="javascript">
var width = screen.width;
if (width >=600) {window.location='
http://mysite.com/'}
</script>
I have placed this code between the <head> and </head> tags but the screen if anything refreshes but does not redirect.
Hope you get the gist and can help
Thanks
Chris
I have created a mobile friendly site for myself and want to redirect visitors if they find it with a resolution of more than 600 pixels to my main site.
The script I'm using is this:
<script language="javascript">
var width = screen.width;
if (width >=600) {window.location='
http://mysite.com/'}
</script>
I have placed this code between the <head> and </head> tags but the screen if anything refreshes but does not redirect.
Hope you get the gist and can help
Thanks
Chris
- pc101seo
- [1] reply
- Christopher Raine
- cfountain
- [1] reply
- Christopher Raine
Next Topics on Trending Feed
-
5