1

For some reason, an update to Site.com is not updating the version call for the css file.

Site.com forces the call to the css file in the head to have a version number. (eg, /assets/css/styles?v=1234). This is obviously to force the browser to use the latest update to the css file.

It normally works, however this time it will not update. I've made three separate changes, published each time, but the call to the stylesheet stays at /assets/css/styles?v=1147. If I manually load that sheet, and change the v parameter to 1148 or 1149, I see my changes. But again, I refresh and even load the page in a new browser, and still Site.com serves the stale css at ?v=1147.

Is there a way to force this to update?

2

So I discovered the issue here and will answer my own question for the benefit of others. This has to do with media queries.

While recently media queries were not supported at all in site.com, they are now supported and you can now edit media queries in your css and publish. But if you only change rules inside your media queries, the updates WILL NOT SHOW UP. This is because site.com will not update the css version. This is a smaller bug than not handling media queries at all, obviously, but still an issue.

The solution for now is to edit something else in the css file just to trigger site.com to supply a new version upon publish. One hacky way to do this is simply to create a meaningless rule and edit it back and forth as needed.

.force-css-version { margin: 0 }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.