Stylesheet Versioning
-
Hey Community!
I am having a very difficult time with stylesheet versioning, and was hoping someone could explain how it works and why I might be experiencing this problem.
I edit my main theme stylesheet via FTP through a desktop app. Usually, when I upload the modified version and refresh the browser, no changes are reflected.
Using a cache-clearing refresh does nothing. Deleting my cache through the browser settings does nothing. Using a browser I haven’t opened in months does nothing.
Even when no version argument can be seen in the page source, Chrome Developer Tools seems to append one in the stylesheet reference in the styles pane. If the stylesheet is modified, the version number reverts by 1 upon refresh, and the changes aren’t reflected. Why would it do that?
For one of my themes (one where the stylesheet is loaded in header.php), I finally added a version argument to the URL in the link tag, and that seemed to help get a fresh copy on each load. But why would I need to do that?
And if I’m using FTP to edit the stylesheet, how would WordPress know to advance the version number?
Any guidance that can help me be able to edit my CSS efficiently once again is appreciated. I am also interested in a fundamental explanation of how versioning works in WordPress.
Thank you so much!
The topic ‘Stylesheet Versioning’ is closed to new replies.