How to force browsers to cache media (Using PHP)?

Hello

I have a media streaming URL with the following php codes at the end:

.
.
.
header("Content-type: audio/mpeg");

header('Content-Length: '.filesize($rlu)); // provide file size

header("Expires: -1");

header("Cache-Control: no-store, no-cache, must-revalidate");

header("Cache-Control: post-check=0, pre-check=0", false);

readfile($rlu);
.
.
.

If i remove the lines:

header("Cache-Control...

Is it enough to tell all browsers to cache my media data?

Thanks in advance :slight_smile:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.