diff --git a/core/js/js.js b/core/js/js.js
index 3904787c4e..5158b66d73 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -226,8 +226,12 @@ var OC={
var path=OC.filePath(app,'css',style+'.css');
if(OC.addStyle.loaded.indexOf(path)===-1){
OC.addStyle.loaded.push(path);
- style=$('');
- $('head').append(style);
+ if (document.createStyleSheet) {
+ document.createStyleSheet(path);
+ } else {
+ style=$('');
+ $('head').append(style);
+ }
}
},
basename: function(path) {