Jump to content

cFire

Active Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by cFire

  1. Well, yes and no. gif+music is the better option if it works reliably across platforms and the music caching is done right. As it is right now, it seems fairly broken. Often music isn't discarded and reloaded from cache along with a new page and it plays two tracks.

  2. <?php
    
    header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
    header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
    echo("<html>");
    
    $loop = 0;
                                                                             
    foreach(glob("/www/*.php") as $roll){
            $rolls[$loop] = $roll;
            //[debug] echo " $roll ";
    
            $loop++;
    }
    
    $element = rand(0, count($rolls)-1);
    require($rolls[$element]);                                  
    
    ?>                   
    </html>
    

    I would like to recommend setting the cache directives in php rather than as a html meta tag. This way they're actually set as http headers which is better supported. (I had some issues with music not being dropped from cache when refreshing)

×
×
  • Create New...