4

As part of the performance improvements I've been working on for Experience Editor in Sitecore 8.1 I wanted to cache the Ribbon files. I followed the guidance here to put them into the browser cache using the manifest attribute (AppCache): http://sitecorejourney.nileshthakkar.in/2015/09/speed-up-your-sitecore-experience.html.

This involved adding the following to the tag:

<html manifest="/sitecore/shell/client/Sitecore/ExperienceEditor/Html5AppCache.ashx">

However we saw some issues with this approach with 'Serious Error' being shown sometimes in Experience Editor. On further investigation it turns out that AppCache is now deprecated http://caniuse.com/#search=manifest and service workers are now recommended instead. However they don't have full browser support yet, Chrome and Firefox only so far with Edge bringing support soon: http://caniuse.com/#search=service%20worker

Has anyone implemented Service Workers for the Experience Editor Ribbon files?

If so did you see much benefit from this and any browser issues?

The AppCache implementation improved the page load of Experience Editor by an additional 1-1.5 seconds so I'm keen to see if I can implement a solution.

1
  • I'm guessing no one has done this then from the lack of answers and comments? Commented Mar 14, 2017 at 18:57

1 Answer 1

3

Starting from Sitecore 9. Experience Editor introduced additional extension points, so now it is enough to extend pipelines with your own JS/CSS files following this example below:

<pipelines>
  <ribbonStylesheets>
    <processor type="Sitecore.ExperienceEditor.Pipelines.RibbonStyleSheets.AddStaticList, Sitecore.ExperienceEditor">
      <path>/sitecore/myAssets/css/myRibbon1.css</path>
      <path>/sitecore/myAssets/css/myRibbon2.css</path>
    </processor>
  </ribbonStylesheets>

  <pageEditingStyleSheets>
    <processor type="Sitecore.ExperienceEditor.Pipelines.PageEditingStyleSheets.Processors.AddStaticList, Sitecore.ExperienceEditor">
      <path>/sitecore/myAssets/css/myEditing.css</path>
      <path>/sitecore/myAssets/css/myEditing2.css</path>
    </processor>
  </pageEditingStyleSheets>

  <pageEditingScripts>
    <processor type="Sitecore.ExperienceEditor.Pipelines.PageEditingScripts.AddDeclaredScripts, Sitecore.ExperienceEditor">
      <path>/sitecore/myAssets/js/myEditingScript1.js</path>
      <path>/sitecore/myAssets/js/myEditingScript2.js</path>
    </processor>
  </pageEditingScripts>
</pipelines>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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