excluding a specific css from caching

excluding a specific css from caching

by nim rod -
Number of replies: 3

Hi to all,
Is it possible to exclude  just a given css file from caching while still using cache for the rest?
Sort of a mix of flexibility and speed..

Thanks and have a nice one smile

Nimrod

using Moodle 3.3.3 (Build: 20171113)

Average of ratings: -
In reply to nim rod

Re: excluding a specific css from caching

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

I'm not entirely sure and have not tried it (on my phone at the moment) but maybe if you add that specific css file as a <link> in the header (additional html?) rather than in config.php, then it may not go through the css processing and caching? 

Average of ratings: Useful (1)
In reply to nim rod

Re: excluding a specific css from caching

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi,

Richard is correct in what he has said.

However there are two ways to do this.

1) As Richard mentioned providing the file is not listed under $THEME->sheets in your themes config.php.

OR

2) If the css styles are just a few lines then you could add them direct to the top of the layout file/s inside a <style> </style> tag..

Cheers

Mary

.