iPod Touch Google Page Creator display oddity

Posted:
in iPod + iTunes + AppleTV edited January 2014
I maintain several Google Page Creator sites...on both personal Gmail accounts and Google Apps for Your Domain (GAfYD) sites.



Like many, I set up the "home" pages to contain simple one-line javascript redirects to nearby htm files, a la:



<script type="text/javascript">document.location='my.htm';</script>



This works in all browsers (Firefox, Opera, Avant, IE). It works on Safari on a laptop.



In Safari on the iPod Touch, if one goes to--> www.mydomain.com/my.htm

...the page displays as intended.



If one goes to---> www.mydomain.com

(without the filename)

...the page displays as if there were no stylesheet, and links taken from within the page ignore their stylesheet links as well.



The same style-less rendering occurs at such sites as msn live.



Is this symptomatic of iPod Touch Safari?

Comments

  • Reply 1 of 7
    No way to know for sure without looking at the actual sites, but here are two things you can try:



    - Change "document.location=" to "document.location.href=" (add the "href" property).

    - Instead of using <script> tags between your <head> tags, put the JavaScript inline in your <body> tag with the "onload" parameter: <body onload="document.location.href='my.htm';">



    BTW, both live.com and msn.com work fine for me. Go to Settings > Safari and clear the cache in your browser to see if that helps.
  • Reply 2 of 7
    Google Page Creator doesn't provide access to the <body> tag (or the <head>, else none of this would be necessary!) so that option won't work, so, I'll try your href suggestion...
  • Reply 3 of 7
    Tried "document.location.href='...



    I cleared the cache.



    Google's Web Toolkit is still getting in the way. (Remember, this does NOT occur on Safari on a laptop, only on iPod Touch.)



    A "real-world" example:



    http://www.idigyardwork.com

    displays with no stylesheet



    http://www.idigyardwork.com/idigyardwork.htm

    (the same file) displays appropriately



    (The latter URL, of course, bypasses server processing of the Google Page Creator "home" page...)
  • Reply 4 of 7
    This may have something to do with the way you're hosting/redirecting the domain. It looks like www.idigyardwork.com is in a frameset, so Mobile Safari loads idigyardwork.htm in the bottom frame and the URL in the location bar doesn't change. Two more things you can try:



    - Change "document.location.href=" to "top.location.href=" (add the "top" parameter to break the frameset).

    - Call your CSS file (and other files, like the favicon) with a backslash ("/") before the filename: <link rel="stylesheet" href="/idigyardwork.css" />



    You can also specify an iPhone-specific CSS file if you really feel like getting fancy with it. Check out the documentation on the Apple Developer Connection site.
  • Reply 5 of 7
    Quote:
    Originally Posted by andreslucero View Post


    This may have something to do with the way you're hosting/redirecting the domain. It looks like www.idigyardwork.com is in a frameset, so Mobile Safari loads idigyardwork.htm in the bottom frame and the URL in the location bar doesn't change. Two more things you can try:



    - Change "document.location.href=" to "top.location.href=" (add the "top" parameter to break the frameset).

    - Call your CSS file (and other files, like the favicon) with a backslash ("/") before the filename: <link rel="stylesheet" href="/idigyardwork.css" />



    You can also specify an iPhone-specific CSS file if you really feel like getting fancy with it. Check out the documentation on the Apple Developer Connection site.



    As for top.location.href, no luck. As for <link changing, I could either add the slash, or make the link FULLY absolute, IF Google Page Creator allowed access to the <head> part of one of their "created" pages.



    (Same reason I can't link to te special iPhone specific CSS, but thanks for the link, I know I'll have fun reading it, geek that I am!)



    Unfortunately, Google Page Creator provides no "standard" access to the <head> area. That's why so many of us have resorted to javascript redirects. A few have tried tricks such as fancy javascript createNode to attach a stylesheet, as you may see at the following link (next paragraph), but to no apparent avail.



    Oh well, I guess I'm stuck, but for your amusement, you may see the code "generated" by Google Page Creator, along with an attempted kludge javascripted css stylesheet attachment, by viewing the source after you go to:



    http://www.paradisedreamhouse.com/splash
  • Reply 6 of 7
    What's strange is that www.paradisedreamhouse.com/splash is hosted & created with Google Pages, but other pages (e.g. www.paradisedreamhouse.com/welcome.htm) appear to be hosted somewhere else, or at least created outside of the Google Pages sandbox.



    I use Google Apps for my mail/calendar, but host my sites on a completely separate server (Dreamhost). You may want to consider doing this as well if you need more control over the design of your pages.
  • Reply 7 of 7
    fjpoblamfjpoblam Posts: 126member
    Total html! Free hosting (Google)! (Eternal life! Infinite wisdom! Peace and kindness for all! But that's off-topic...)



    I wrote the html, in the first editable section, attaching a style sheet using a neat javascript I found in Google Groups and written by Philippe Chappuis:



    http://philippe.chappuis.googlepages.com/



    The other files in the Google area are indeed all mine, including the CSS. I'm not paying for a host, just a domain registrar. I have a host, but this particular domain was "parked" there. I'm hoping to move this domain off, on its own, to Google space, using just cnames. It'll cost nada for $$$, which my sister-in-law will no doubt appreciate.



    $7 per year for domain registration is cheap, and the website displays okay everywhere but for a danged iPhone/iPod Touch, which would be very nice, and which now I figure lacks only my very peeeyuuuneee measly skills!
Sign In or Register to comment.