Archived topic
Child Theme CSS Cache Busting
7 replies · Started by Todd on May 3, 2018
I am using a child theme CSS since I have almost 700 lines of CSS and I can seem to get the site to update the the cache for Changes I make to the CSS. I don't have any caching or optimization turned on and this is still the case. The site is Cached within SiteGround but I purge all levels of cache and the changes still do not show up.
I noticed that if I put the CSS in simple CSS or in the additional CSS in the customizer that this is not an issue since it seems like there is something that pushes a query string or something that updates CSS changes when changes are made there.
I am looking for a method to do this with the child theme CSS I have read a little bit about changing the in enqueuing but the seems a little complicated.
Hi there,
Hmm I would recommend checking your CSS first and make sure there isn't mistakes:
https://jigsaw.w3.org/css-validator/
If there is a mistake above, like a missing closing bracket, it can stops the CSS below from executing.
Let me know if this helps.
Yes, I checked it, I took the same CSS and put it in Simple CSS and everything is fine.
I am looking for a way though that allows me to use the Child theme CSS since I could see getting to a point of having over 1000 lines in there. Both Simple CSS and the additional CSS seem to work just fine and the CSS updates when I make changes. The child theme does not update even though I purge the cache on the server (SiteGround) unless I view it in incognito. Obviously I could clear my cache on my browser but that does not help with all the previous visitors of the site including my client.
I assume that there is a query string or something that changes on Simple and additional CSS files to update the CSS cache where as the child theme CSS does not. I have tried adding a query string to the end of the Child Theme Style.css file but that does not work.
The child theme style.css file should have a query string added to it by default. That string should update each time the file is saved.
Do you have anything removing query strings on your site? Can you share a link so I can take a look?
Yes, I have a plugin on site called perfmatters and I had the Remove Query Strings: enabled. I should have thought of that.
I will get with the developers to see if I can just exclude the style.css from the settings.
BTW, I am premium license for WPSP and I have what I think is a simple issue "Updated Date Meta from GeneratePress" to solve and I have not heard anything for a month.
Thank you!
Sorry about that! I wasn't notified. Replied :)
No problem, Thank you!
I have the same problem but no plugins interefere with the query strings...
Edit: Found it