CSSやJSファイルでキャッシュを読まないように、そのファイルの最終更新日時のタイムスタンプをパラメータに付与する。
<?php $style = './css/style.css'; echo '<link rel="stylesheet" href="'.$style.'?'.filemtime($style).'" />'; ?>
注意) 相対パスじゃないと取得できない。 (絶対パスやルートパスだとうまくいかない。)
WordPressの場合、get_template_directory()関数を使うと便利。
<?php $style = get_template_directory().'/css/style.css'; echo '<link rel="stylesheet" href="'.$style.'?'.filemtime($style).'" />'; ?>