1. 22 Oct, 2014 2 commits
  2. 17 Oct, 2014 1 commit
  3. 16 Oct, 2014 1 commit
    • Mathijs den Burger's avatar
      CMS7-8367: initial implementation of the auto-reload service · 4a3b6309
      Mathijs den Burger authored
      The service provided a JavaScript snippet that lets a browser connect to the auto-reload server using WebSockets. Whenever #broadcastPageReload is called, a 'reloadPage' message is sent to all connected browsers that will then reload the current page. 
      
      When a WebSocket connection is closed unexpectedly (e.g. because the server is stopped), the JavaScript snippet tries to reconnect every five seconds for 10 minutes, and then gives up.
      
      The auto-reload service is enabled by default. It can be toggled via the configuration parameter 'enabled'. Changes to the JCR configuration are picked up and effective immediately. The auto-reload service can also be disabled via code using the #setEnabled method.
      
      The auto-reload service is supposed to be injected into Tomcat's shared/lib folder by Cargo, so it'll only be available during local development. For that reason only dependencies can be used that are available in the shared/lib folder. The WebSockets API implementation is provided by Tomcat.
      4a3b6309