Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Macintosh Changing iFrame user agent in Safari

    I'm creating a customized homepage for Safari 5 on my 15" MBP.

    It's four websites side by side (Gizmodo mobile, Engadget mobile, MacRumors mobile, Yahoo! Mail Mobile).

    MacRumors and Yahoo! Mail work just fine.

    But on Engadget and Gizmodo, when I click on a link, it goes on the full website and I can't see the whole page because of the size of my iFrame.

    But both of them work the way I wan't when I change my user agent to iPhone.

    Can I assign a user agent to an iFrame or the whole page? Or is there any other way around?

    Thanks.


    Here's the code of my Homepage for now:

    [CODE]
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>

    <head>
    <title>Homepage</title>
    </head>
    <body>
    <iframe src="http://gizmodo.com/?view=mobile" style="border:1px solid;" name="frame1" scrolling="auto" frameborder="yes" height = "705px" width = "345px">
    </iframe>
    <iframe src="http://m.engadget.com" style="border:1px solid;" name="frame1" scrolling="auto" frameborder="yes" height = "705px" width = "350px">
    </iframe>
    <iframe src="http://mobile.macrumors.com" style="border:1px solid;" name="frame1" scrolling="auto" frameborder="yes" height = "705px" width = "345px">
    </iframe>
    <iframe src="http://m.mg.mail.yahoo.com/hg/?.intl=ca&.lang=fr-ca#/mail/list?fid=Inbox" style="border:1px solid;" name="frame1" scrolling="auto" frameborder="yes" height = "705px" width = "345px">
    </iframe>
    </body>
    </html>
    [CODE]

  • #2
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Vous parlez français, non ?
    There's no real way to do this without setting the user-agent string for the entire browser, as far as I can tell. You may be able to do this in JavaScript, but it would involve AJAX somehow.
    I think you should seriously consider using Google Reader, though.
    Also worth nothing is that your iframes all have the same name.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •