Website Keeps Defaulting to Mobile Site

Hi, gang.

I created a website to promote the launch of my new book.

At one point, I installed the iPhone re-direct action to send mobile browsers to the mobile version of the site, but it wasn’t working properly, so I deactivated the action. In place of the iPhone action, I installed line of code that re-directs people with mobile browsers to the mobile version of the site.

The problem is that about 10% of the time, I’m still re-directed to the mobile site when I access it from my desktop. So, I’ll type in the web address from my desktop and the mobile site will pop up. (Interestingly enough, it’ll re-direct me to an older version of the mobile site.)

I’ve cleared my cache on Firefox to see if that was the issue, but it still re-directed me to the old version of the mobile site.

The website is http://www.GoMobileBook.com

Any thoughts on what’s going on?

Thanks,
Jamie


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

What I do see on that page is at least 2 lots of javascript code that are being loaded twice

<script type="text/javascript" async="" src="http://www.google-analytics.com/ga.js"></script>

<script type="text/javascript" src="http://wd-edge.sharethis.com/button/checkOAuth.esi"></script>

That might be enough to cause problems.

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi, Dave –

Thanks for your follow-up.

One of those sets of javascript is for Google Analytics and the other one is for my ShareThis button for social sharing.

Both entities (Google and ShareThis) said to put their code before the thingy, so I went into the HTML Markup menu and added them both to the same place.

I don’t know if that would have caused the problem or not.

On the other hand, the re-direct code I use is placed after the and looks like this:

All this is very odd since it seems to happen intermittently. I’m still a little stumped. Any help you could provide would be appreciated.

Best,
Jamie


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Yes, but both of those (Google and ShareThis) appear twice on that page.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hmmmm. That’s interesting. I went in to look at the code via my browser and you are indeed correct. (But you knew that already, didn’t you.)

:wink:

Oddly, when I go into Freeway Pro and look at the Page > HTML Markup item, each line of code only shows up once.

So that’s odd.

Any thoughts on what might be causing that?

If all else fails, I could go in and re-create the page again and see if that fixes it. I’d be a little worried about that since we’re in the middle of the promotion of the book, but that may be my only option.

Thoughts?

And thanks.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Jamie,

Looks like you’ve got the Google Analytics Action applied as well as the code you put in as markup. Either remove the Action or your own code to fix that problem. As for the redirect, I have no idea why that’s happening intermittently. It seems to be working properly here.

I did find this forum post that claims that screen.width can be unreliable. Though they seem to be talking specifically about Android devices:
http://www.thegalaxytabforum.com/index.php?/topic/621-detecting-android-tablets-with-javascript/

Joe


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Ahhhh, that might explain things. Thanks for checking into this.

This one is a tough one since the problem is intermittent. But I’ll take a look at the duplicate code again and see if that doesn’t fix things.

Thanks again for both of your help.

– Jamie


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options