Force LESS to recompile

Permalink
When I update my styles.less file, the changes don't go in effect on the initial page load. After the client refreshes the page, the changes are there.

This occurs even though I've cleared the cache from the C5 dashboard.

I'm using version 5.7.5.3.

Is there a bug in this version of C5? Is there a way I can force the LESS to recompile like CSS versioning? Any other ideas?

leinteractive
 
JohntheFish replied on at Permalink Reply
JohntheFish
It could be the browser cache. Browser caches are particularly sticky for css.
leinteractive replied on at Permalink Reply
leinteractive
I typically force the browser to refresh the CSS with versioning. Something like this:

<link rel="stylesheet" href="/styles.css?v=081916">


I tried that with the LESS tag, but the code isn't valid:

<?php echo $html->css($view->getStylesheet('styles.less?v=081916'))?>


And that makes sense cause when I view the source it's just the generated CSS file...not the LESS file.

Any ideas on how to append that version control to the stylesheet?
JohntheFish replied on at Permalink Reply
JohntheFish
There may have been some discussion on adding a version to css on github. You could have a look through the issues and see.