ICEfaces
  1. ICEfaces
  2. ICE-5693

Prepend javascript random number

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.8.2-EE-GA_P01, 1.8.2a
    • Fix Version/s: None
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      All

      Description

      When components or applications use JavascriptContext to execute javascript on the browser, it all goes into a script tag that has a random number on the end, in a comment, to enforce re-executing the script, if the contents have not changed. Since we always want it to execute, and thus always have the DOM diff find it different, we should put the random number at the beginning of the script, instead of at the end, so that the DOM diff detects the difference immediately, without having to waste cycles on the rest of the script.

      Maybe the number could be wrapped in /* */, or if that doesn't work, a newline could be written, like this //number\n so that the comment doesn't comment out the rest of the script.

      Here's an example of how it is now, with the number at the end:

      <update address="2EMnqGPJz-z77KYZih97gw:1:dynamic-code" tag="script"><attribute name="id"><![CDATA[2EMnqGPJz-z77KYZih97gw:1:dynamic-code]]></attribute><attribute name="type"><![CDATA[text/javascript]]></attribute><content><![CDATA[Droppables.add('iceform:icepnltabset:0:shoppingCart',{hoverclass:'cartDropTarget',mask:'1,2,3,4,5'});Droppables.add('iceform:icepnltabset:0:_id128',{hoverclass:'cartDropTarget',mask:'1,2,3,4,5'});id = 'iceform:icepnltabset:0:DataTbl:1:_id117';new Effect.Highlight(id,{startcolor:'#fda505'});//-1327116418]]></content></update>

        Activity

        Mark Collette created issue -
        Ken Fyten made changes -
        Field Original Value New Value
        Salesforce Case []
        Fix Version/s 1.8.2-EE-GA_P02 [ 10226 ]
        Deryk Sinotte made changes -
        Salesforce Case []
        Assignee Priority P2
        Assignee Mircea Toma [ mircea.toma ]
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s 1.8.2-EE-GA_P02 [ 10226 ]
        Assignee Priority P2
        Assignee Mircea Toma [ mircea.toma ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Mark Collette
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: