Why do changes to some php files take so long to show on the live site

后端 未结 1 532
北海茫月
北海茫月 2020-12-07 05:14

I\'m using WordPress. Sometimes when I update certain php files in the theme the changes show on the live site right away (header.php for example). However when I make chang

1条回答
  •  温柔的废话
    2020-12-07 05:51

    I use Mark Jaquith's solution (see here) to stop my stylesheets being cached. Not sure it applies in your case, given it happens on a new browser, but it's worth a try.

    In essence you append the file modification timestamp to the URL, so when the file changes, the browser thinks the URL has changed and downloads the latest version. Mark's example, for the theme stylesheet:

    
    

    0 讨论(0)
提交回复
热议问题