primefaces.MOVE_SCRIPTS_TO_BOTTOM

UI Components for JSF
Post Reply
Teutron
Posts: 29
Joined: 09 Mar 2021, 11:35

27 Sep 2021, 15:56

Hi all,

I have one question about the primefaces.MOVE_SCRIPTS_TO_BOTTOM feature.
Is there an way to disable the funcation for specific includes?
I have the issue that some external script didn't work on PROD, after I activated it in the web.xml.

BR
Florian

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

27 Sep 2021, 16:05

Its global only
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

Teutron
Posts: 29
Joined: 09 Mar 2021, 11:35

28 Sep 2021, 11:38

Hi Tandraschko,

I checked my issue a little more over the night and found my issue.

In my XHTML I have the following script import:
<script src="https://primefaces.org/primefaces.js"
type="text/javascript" charset="UTF-8"
data-domain-script="OneParameterValue" />

Browser output with primefaces.MOVE_SCRIPTS_TO_BOTTOM = off:
<script src="https://primefaces.org/primefaces.js" type="text/javascript" charset="UTF-8" data-domain-script="OneParameterValue"></script>

Browser output with primefaces.MOVE_SCRIPTS_TO_BOTTOM = on:
<script type="text/javascript" src="https://primefaces.org/primefaces.js">

So in my case the additional parameters are deleted with the MoveScriptsToBottomResponseWriter class.

BR
Florian

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

28 Sep 2021, 11:50

yeah
we may add some algorithm to not merge such scripts with additional parameters, feel free to create a feature request
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

Teutron
Posts: 29
Joined: 09 Mar 2021, 11:35

28 Sep 2021, 12:11

Thanks for your reply Trandraschko.

I opened https://github.com/primefaces/primefaces/issues/7882 for the descripted issue.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 37 guests