Results 1 to 3 of 3

Thread: Caching video's

  1. #1

    Thread Starter
    Hyperactive Member Krokonoster's Avatar
    Join Date
    Jan 2010
    Location
    Cape Town
    Posts
    448

    Caching video's

    I promised a mate I'll ask around about a little issue he's having.

    Having a website, where user's log in and based on their roles can watch training videos.
    Each video pretty large and take a while to buffer. After you watched it, it's ok to watch it again, as it's cached on the local machine.
    However when you restart the machines of course those caches are cleared and going to your video's again, you start all over.

    Want to figure out something that will work if different users, using different accounts use the same machine, so "save to your computer" is not really a solution.

    Any ideas?


  2. #2
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    Re: Caching video's

    you could try making a script that streamed the file to the user and also sent a header that said to cache the file for longer. if your computers clear the cache every restart, though, this may not matter.

    from PHP.net:
    PHP Code:
    <?php
    // seconds, minutes, hours, days
    $expires 60 60 24 14// 14 days
    header("Pragma: public");
    header("Cache-Control: maxage=" $expires);
    header('Expires: ' gmdate('D, d M Y H:i:s'time() + $expires) . ' GMT');
    ?>

  3. #3
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Caching video's

    Compress the videos more.

Posting Permissions

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



Click Here to Expand Forum to Full Width