Skip to content

Instantly share code, notes, and snippets.

View ruslan-chubatov's full-sized avatar

Ruslan Chubatov ruslan-chubatov

  • Capgemini Engineering Ukraine
  • Odessa, Ukraine
View GitHub Profile
// Destroys the localStorage copy of CSS that less.js creates
function destroyLessCache(pathToCss) { // e.g. '/css/' or '/stylesheets/'
if (!window.localStorage || !less || less.env !== 'development') {
return;
}
var host = window.location.host;
var protocol = window.location.protocol;
var keyPrefix = protocol + '//' + host + pathToCss;