Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Subtitle srt file caching


Hi, I'm not sure if this is the correct section, but I have a question about srt subtitle files. I have got the subtitles to show properly, but I find that once I play the video and then change the subtitle file on my server, and then play the video again it still shows the old version of the subtitles. CTRL-F5 does not seem to fix the issue.

Any thoughts on how to always retrieve the file from the server in case there have been changes made?

Thanks,
Gavin

5 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

You should generate a random number in JavaScript and then append the random number to the end of the srt file.

admin

User  
0 rated :

Thanks for the reply. So if the filename on the server is bla_English.srt, in the jwplayer config generated when the page is loaded we use a filename like bla_English.srt.dhdhd33?

If I am understanding wrong could you provide more details? Thanks

Ethan Feldman

JW Player Support Agent  
0 rated :

Something like:

bla_English.srt?rand=4873874

admin

User  
0 rated :

Works great, thanks!

Ethan Feldman

JW Player Support Agent  
0 rated :

Np!

This question has received the maximum number of answers.