ICEfaces
  1. ICEfaces
  2. ICE-9225

Use Resource Ordering to force all CSS resources to load before JavaScript in the Showcase sample app.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: EE-3.3.0.GA, 4.0.BETA, 4.0
    • Component/s: Sample Apps
    • Labels:
      None
    • Environment:
      ICEfaces 3.x, showcase sample application.
    • Assignee Priority:
      P2
    • Affects:
      Sample App./Tutorial

      Description

      As per the general best-practice of loading all CSS prior to any JavaScript (https://developers.google.com/speed/articles/include-scripts-properly), we should ensure that the ICEfaces Showcase sample application follows the recommendations.

      We can the use of the ICEfaces Resource Ordering (resource-dependency.xml) technique to demonstrate a way to ensure that all application CSS resources are loaded in the browser prior to any JavaScript being loaded.

        Issue Links

          Activity

          Hide
          Ken Fyten added a comment -

          Initial attempt to force all CSS to load prior to JavaScript committed via showcase resource-dependency.xml changes.

          svn commit -m "ICE-9225 - Modify showcase resource-dependency.xml to attempt to force all CSS to load prior to any JavaScript."
          Sending.../icefaces/samples/showcase/showcase/src/main/resources/META-INF/resource-dependency.xml
          Committed revision 34579.

          Show
          Ken Fyten added a comment - Initial attempt to force all CSS to load prior to JavaScript committed via showcase resource-dependency.xml changes. svn commit -m " ICE-9225 - Modify showcase resource-dependency.xml to attempt to force all CSS to load prior to any JavaScript." Sending.../icefaces/samples/showcase/showcase/src/main/resources/META-INF/resource-dependency.xml Committed revision 34579.
          Hide
          Ken Fyten added a comment -

          With this commit, there remains one issue when coalesceResources= false:

          The "./xmlhttp/css/rime/rime.css" resource doesn't respect the ordering, and is loaded after all the JavaScript.

          See the None_Coalesced_Rime-css_Issue.png.

          Show
          Ken Fyten added a comment - With this commit, there remains one issue when coalesceResources= false: The "./xmlhttp/css/rime/rime.css" resource doesn't respect the ordering, and is loaded after all the JavaScript. See the None_Coalesced_Rime-css_Issue.png.
          Hide
          Ken Fyten added a comment -

          Additionally, when coalesceResources=true, the Rime.css issue still exists, as well, there is a new issue with the jsf.js file loading first before the css (that doesn't occur when coalesceResources=false).

          See the attached Coalesced_jsf-js_Rime-css_issues.png

          Show
          Ken Fyten added a comment - Additionally, when coalesceResources=true, the Rime.css issue still exists, as well, there is a new issue with the jsf.js file loading first before the css (that doesn't occur when coalesceResources=false). See the attached Coalesced_jsf-js_Rime-css_issues.png
          Hide
          Ken Fyten added a comment -

          To try to resolve the jsf.js coming first issue when coalesceResources=true I modified the core resource-dependency.xml file as shown in the attached resource-dependency-xml-edits.png, but it made no difference.

          Show
          Ken Fyten added a comment - To try to resolve the jsf.js coming first issue when coalesceResources=true I modified the core resource-dependency.xml file as shown in the attached resource-dependency-xml-edits.png, but it made no difference.
          Hide
          Ken Fyten added a comment -

          Assign to Mircea for follow-up.

          Show
          Ken Fyten added a comment - Assign to Mircea for follow-up.
          Hide
          Ken Fyten added a comment -

          Note that if it becomes necessary to make the compat themes (such as rime.css) available via the JSF2 resource mechanism, there is an existing JIRA for that: ICE-6581.

          Show
          Ken Fyten added a comment - Note that if it becomes necessary to make the compat themes (such as rime.css) available via the JSF2 resource mechanism, there is an existing JIRA for that: ICE-6581 .
          Hide
          Mircea Toma added a comment -

          The fix for ICE-9187 has solved this problem as well.

          Show
          Mircea Toma added a comment - The fix for ICE-9187 has solved this problem as well.
          Hide
          Mircea Toma added a comment -

          Make sure rime.css and ./resources/css/override_header.css are loaded before the Javascript resources.

          Show
          Mircea Toma added a comment - Make sure rime.css and ./resources/css/override_header.css are loaded before the Javascript resources.
          Hide
          Mircea Toma added a comment -

          Modified showcase app to serve its CSS resources through JSF resource mechanism. Modified resource dendencies that all CSS is loaded before any JS resource.

          Show
          Mircea Toma added a comment - Modified showcase app to serve its CSS resources through JSF resource mechanism. Modified resource dendencies that all CSS is loaded before any JS resource.

            People

            • Assignee:
              Mircea Toma
              Reporter:
              Ken Fyten
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: