http-equiv refresh: works in Firefox, not in Safari

Discussion in 'Web Design and Development' started by Lorthirk, Jul 27, 2008.

  1. Lorthirk macrumors member

    May 16, 2007
    Hi all. I have a very strange problem with Safari and auto refreshing. The short story is: I have a quite old web application which uses http-equiv refresh in an hidden frame to refresh the content in another frame. With Firefox the main frame (chattesto) refreshes correctly, while not in Safari. Here's the code:

    <meta http-equiv="refresh" content="8">
    <link rel="stylesheet" href="mainchat.css" TYPE="text/css" />
    <body style="background-image: url(img/refresh.jpg);"  >
        $Testata .= "<HEAD><link rel=\"stylesheet\" href=\"mainchat.css\" TYPE=\"text/css\"></HEAD><BODY style='background-image: url(img/refresh.jpg); '>";
    [useless php code]
    $newchat = $Testata.$newchat;
    $newchat = str_replace("\\", "\\\\", $newchat);
    $newchat = str_replace("'", "\\'", $newchat);
    <script type="text/javascript">
    parent.chattesto.document.write('<?= $newchat ?>');
    var h = 0;
    try {h = parent.chattesto.document.body.offsetHeight + 1000;} catch(e) {h = 0};
    parent.chattesto.scroll (0, h);
    Any help would be really appreciated!

    Edit: I think I should add more info. If I try to open this frame in a new tab, the frame starts to refreshing itself. Instead, if it is embedded with others, it does nothing.
  2. angelwatt Moderator emeritus


    Aug 16, 2005

Share This Page