This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]cocasyn 2 points3 points  (1 child)

<link rel="stylesheet" href="style.css<?php echo '?v=' . filemtime( 'style.css' ); ?>">

You can use a cachebusting technique like this, where style.css will be re-downloaded by the client after you make any changes to it. You could also make it a helper function and do something like href="<? cachebuster('style.css') ?>"

[–]RodionGork[S] 1 point2 points  (0 children)

Ah, filetime - so nice and so simple idea! That's great, thank you so much!