Menu icon Foundation
foundation flex-video getting cached

Hello all!
I have really nasty problem that right now i don't have the time to troubleshoot myself, so i wonder if anyone had this shot down already.
Here is a snippet to get you into speed:
YTVIDEOCode is generated by php and it changes on every page load. However, while i see that the youtube video ID changes in the source of the page, the player however does not. It keeps the first loaded video.
This only changes if i hit ctrl+f5 and reload the page. The only time this works is when i load all the things anew and this is not an option for me.
The php itself is set to not cache anything ever. The browser is set to cache nothing ever and i don't have any such problems with anything else. Only Flex-Video at this point is giving me troubles.

I would be grateful if you guys give me directions on how to proceed troubleshooting this.

P.S. I love Foundation. It made my life easier and simpler.

<div class="flex-video"><iframe src="http://www.youtube.com/embed/YTVIDEOCode" frameborder="0" allowfullscreen></iframe></div>
            

         

flexVideocacheproblem

Hello all!
I have really nasty problem that right now i don't have the time to troubleshoot myself, so i wonder if anyone had this shot down already.
Here is a snippet to get you into speed:
YTVIDEOCode is generated by php and it changes on every page load. However, while i see that the youtube video ID changes in the source of the page, the player however does not. It keeps the first loaded video.
This only changes if i hit ctrl+f5 and reload the page. The only time this works is when i load all the things anew and this is not an option for me.
The php itself is set to not cache anything ever. The browser is set to cache nothing ever and i don't have any such problems with anything else. Only Flex-Video at this point is giving me troubles.

I would be grateful if you guys give me directions on how to proceed troubleshooting this.

P.S. I love Foundation. It made my life easier and simpler.

<div class="flex-video"><iframe src="http://www.youtube.com/embed/YTVIDEOCode" frameborder="0" allowfullscreen></iframe></div>
            

         

Zhivko Kostadinov gave the most helpful answer for this post
Zhivko Kostadinov almost 4 years ago

Hey, I`mma answer myself since i managed to brute-force it to work.

I will not speculate what and how .... here is my solution:
PHP
echo '<div class="flex-video '.md5(uniqid()).'"><iframe src="http://www.youtube.com/embed/';

Added additional class name randomly generated to the flex-video div. Now everything refreshes on simple reload.

I hope this will help somebody!

Zhivko Kostadinov almost 4 years ago

Hey, I`mma answer myself since i managed to brute-force it to work.

I will not speculate what and how .... here is my solution:
PHP
echo '<div class="flex-video '.md5(uniqid()).'"><iframe src="http://www.youtube.com/embed/';

Added additional class name randomly generated to the flex-video div. Now everything refreshes on simple reload.

I hope this will help somebody!