Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

Flv not playing on second visit due to IE cache

13 replies [Last post]

I put an FLV movie in the homepage header of a wordpress site and it works fine except that on quick repeat visit to the homepage the movie does not show in IE.

When I turn of check for new versions of pages "automatically" and put the cache on "check everytime" it works fine. So I know what the problem is but no solution. I tried setting the meta tag for no-cache but that dit not work.

Does anyone know a solution or workaround?

The normal cache busting technique is to add a random number to the filename.

'file': 'video.flv?' + (Math.round(1000 * Math.random())),

Hmmm, thanks for your suggestion. I used php to add a random number like that in the SWF object code but that did not work. See below

so.addVariable('file','video.flv?<? echo rand (1,24); ?>');

any other suggestions would be really appreciated.... thanks...

Yeah, that'll work.

Now that you've destroyed the filename, you must tell the player what type of media file it will be receiving.

'type': 'video',

Sorry... forgot about that part.   :|

Thank you, I added the code so now the file is recognized when I add the random number.

But helas it's not solving the problem. The video plays fine on first visit. But when browsing away from the homepage and returning to the homepage shortly thereafter the sfw-player loads but the video does not appear. Only after a few hard refreshes (shift-F5) or waiting for a few minutes the video loads again.

The effect is only there on IE with cache check on automatic. But that is unfortunately the default install configuration. On FF en Safari it works fine....

If you look in the IE cache, do you see files like:

video.flv?123
video.flv?382
video.flv?521

I've implemented the "cache buster" programatically quite a few times and it always works.

Hmmm, yes I can find these in the IE cache on windows XP. On Windows Vista I can't seem to find them. But the "temporary internet files" folder where they should be is almost empty. So I don't know where these cache files go on Vista.

Perhaps if you could have a look for yourself to see the effect. That might help? See the video in the top right corner at http://www.boudewijncommunicatie.nl

Thanks for your help....

 
I'm seeing the files with the random number appended in my IE cache (Windows XP).

druppel.flv?123
druppel.flv?132
druppel.flv?975

So the appended random number is working and the file reloads when the page is reloaded, so IE doesn't start looking in it's cache for the file.

However, the real problem that I see with your video, is that it is massively over-encoded.

Your video is encoded at a bitrate of 2205kbps which is much higher than my DSL download rate of 1600kbps. Therefore, the player consumes the video faster than it is delivered, leading to stuttering.

For an Internet video sized 352x240, a bitrate of 500kbps, perhaps 800kbps if you want high quality, should be sufficient. Also, the frame rate of 30.1fps is quite high for Internet video. 20-25fps is usually good enough.

I suggest that you re-encode your video file at a lower bitrate and framerate. Depending on the quality that you want and your users average download speed somewhere between 500kbps/20fps and 800kbps/25fps should be good.

Then the video should play smoothly when the page is loaded.

MediaInfo:

General
Complete name                    : C:\Documents and Settings\Chris\Local Settings\temp\druppel[1].flv
Format                           : Flash Video
File size                        : 3.20 MiB
Duration                         : 12s 178ms
<strong>Overall bit rate                 : 2 205 Kbps</strong>
Encoded date                     : 2009_08
Tagged date                      : UTC 2009-08-24 10:53:26
Tagging application              : created with SUPER(C).v2009.bld.36
Meta_Tag                         : drop

Video
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : Baseline@L1.3
Format settings, CABAC           : No
Format settings, ReFrames        : 1 frame
Muxing mode                      : Container profile=Unknown@1.3
Duration                         : 12s 178ms
Bit rate                         : 2 204 Kbps
Width                            : 352 pixels
Height                           : 240 pixels
Display aspect ratio             : 1.500
<strong>Frame rate                       : 30.100 fps</strong>
Original frame rate              : 29.970 fps
Resolution                       : 24 bits
Colorimetry                      : 4:2:0
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.867
Stream size                      : 3.20 MiB (100%)

Thanks for your input. I recoded the file now with 23.xxx fps and a bitrate of 384kbps. It's much smaller (though still 600Kb) and still reasonable quality. It's much appreciated...

The "video not starting on quick revisit problem" is still there though in IE..... any other suggestions or should I give up on this...

thanks a lot for your help!

Hi

I am also experiencing the same problem, again only in IE. (all versions). After either a refresh or a navigate away from the page and back again the flv fails to play. If i re-enable the control bar I can always restart the flv so is it something to do with the flashvars not reloading? Also, if you open another tab and then refresh the original tab immediately the flv plays. Weird, but definitely something to do with the cache. Plays fine in other browsers. Help gratefully received.

G

I have exactly the same problem, in either IE7 or IE8. Very anoying. Help would be appreciated.

I found a working solution! At least for my case. I use swfobject for including the Flash markup. It seems that sometimes, especially when the movie is cached, the IE render engine is still too busy, and fails to correctly include the Flash code.

The working trick for me is to use setTimeout method with 0.01 as second argument. The first argument being the function with the swfobject stuff in it. I use the Prototype Javascript library, so I use the defer() method. It should make no difference though.

From the Prototype documentation for defer():
"Schedules the function to run as soon as the interpreter is idle.
A "deferred" function will not run immediately; rather, it will run as soon as the interpreter's call stack is empty."

Anyway, it's working 100% for me now, and I'm glad this pain is over!

- Daco

I have a similar problem. The video works perfectly OK in IE8. If now I try to open another video of th same site (having JW player), it does not show any video.

Here are my links:

The below link will play the video when clicked
http://www.koozbatest.com.php5-12.dfw1-1.websitetestlink.com/test1.html

The below link won't play the video when opened in a new IE8 page
http://www.koozbatest.com.php5-12.dfw1-1.websitetestlink.com/test2.html

Interestingly, I found the problem getting resolved in IE version: 8.0.600 1.18882
cipher Strength: 256-bit

but in below version it shows the problem

IE version: 8.0.600 1.18702 cipher Strength: 128-bit

Please advise what to do.

Regards
Rajesh

@Rajesh, maybe it is how you are loading the file with JS?

I took your FLV and played it with our wizard, and it works in IE for me - http://www.longtailvideo.com/support/jw-player-setup-wizard

http://www.koozbatest.com.php5-12.dfw1-1.websitetestlink.com/uploads/videos/video-46-249.flv?rand=19