2021年3月23日星期二

How can I force browser to refresh the cache with php?

I am a beginner web "developer". I'm making the site of our dog kennel. I've been facing the cache problem for days. I found out PHP filemtime could do the job, I just want to ask, if I put the PHP code like this, would it work? If not, could you help me please, how to do this?

<link rel="stylesheet" type="text/css" href="../../../styles/basic.css?v=<?php filemtime('../../../styles/basic.css') ?>"/>  
https://stackoverflow.com/questions/66736394/how-can-i-force-browser-to-refresh-the-cache-with-php March 22, 2021 at 03:02AM

没有评论:

发表评论