Disable YouTube video caching

YouTube did a great job when the youtube video worked with a cache. However, this is causing a problem on my ajax site and would like to know if there is a way to disable youtube caching. Especially in Internet Explorer.

I cannot turn off caching for the whole page, since I need caching to work with images and other content for speed reasons.

Does anyone know any solutions?

+3
source share
2 answers

Just make sure that each time the user is logged in with a unique URL. Your player’s code contains something like the following:

http://www.youtube.com/v/sMiUpl_6jI0?fs=1&hl=en_GB

URL- YouTube. , , , ( PHP):

http://www.youtube.com/v/sMiUpl_6jI0?fs=1&amp;hl=en_GB&amp;noCachePlease=<?php echo uniqid() ?>

, , URL- , - .

+4

:

<meta http-equiv="Expires" content="0">

<meta http-equiv="Pragma" content="no-cache">

, - , . , - .

, , .

0

Source: https://habr.com/ru/post/1767562/


All Articles