Closed Thread
Results 1 to 4 of 4

Thread: Internet Explorer caches videos

  1. #1
    Ray
    Ray is offline Newbie
    Join Date
    Nov 2008
    Posts
    2
    Rep Power
    0

    Exclamation Internet Explorer caches videos

    We developed a site similar to YouTube...however there is a problem. When a viewer selects a video then selects another video the player, plays previous video. The title and description are correct but the video is always the previous video. I appears that
    Internet Explorer caches videos. Using the Firefox browser on my workstation, I was unable to reproduce the "duplicate video" problem that I was viewing with Internet Explorer.

    Is there code that would affect the way Internet Explorer caches video content?

    Could this be an html issue not a php issue?

    How can we fix this issue?

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Jordan Guest

    Re: Internet Explorer caches videos

    First I'd have to ask how you are presenting the videos to the user?

    One way to get around browser caching is to create a random number and attach an arbitrary value to the URL. For example, if you look at CodeCall Programming (homepage) the images there are randomly selected via PHP. Normally it would display the same image for all three segments but I created a random number and attached it as I explained above. The image URL looks like this:

    HTML Code:
    http://www.codecall.net/dir/rimage.php?value=<Random Number>
    The random number causes browser to load the content as new content. Not sure if this will help you in your case though.

  4. #3
    Ray
    Ray is offline Newbie
    Join Date
    Nov 2008
    Posts
    2
    Rep Power
    0

    Exclamation Re: Internet Explorer caches videos

    currently the video is presented like this
    /index.php?file=pages/final_video&id=165

    what should change here and should this be done for all videos?

  5. #4
    Jordan Guest

    Re: Internet Explorer caches videos

    You could implement what I stated above. Attach the random number like this:

    Code:
    /index.php?file=pages/final_video&id=165&<argument>=<random number
    For example:
    Code:
    /index.php?file=pages/final_video&id=165&random=902436787 
    You can use the PHP rand() function attach this and yes, it should be done to all videos and should change each time the video is called. This may not be the best method but it works well for images.

    Another method may be to look at the header() output and disable caching. We use this in our community project ionFiles to prevent file caching:

    Code:
            header("Pragma:no-cache");
            
    header("Expires: 0");
            
    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
            
    header("Cache-Control: public"); 

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Internet Explorer 8
    By snowman in forum Computer Software/OS
    Replies: 47
    Last Post: 02-25-2009, 01:16 PM
  2. :( internet explorer
    By shibbythestoner in forum HTML Programming
    Replies: 4
    Last Post: 11-24-2007, 08:58 AM
  3. Disabling Internet explorer
    By pankaj2007 in forum Java Help
    Replies: 2
    Last Post: 04-10-2007, 02:13 AM
  4. I don't like Internet Explorer 7!
    By mysticalone in forum Computer Software/OS
    Replies: 21
    Last Post: 02-03-2007, 04:12 PM
  5. Internet Explorer 7.
    By PC101 in forum Technology Ramble
    Replies: 12
    Last Post: 11-20-2006, 11:47 AM

Tags for this Thread

Bookmarks

Posting Permissions

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