Javascript which should be placed before the end body tag

@Norm How can I place some Javascript before the end tag of the final generated html/php page?

1 Like

It’s not possible, it currently would need to be done manually.

Could you explain why you need this?

Hello, @norm. Some of the scrips should be runned after almost entire webpage is loaded. I completely forgot to tell you about it. Besides the ability to put the code before the page, the same ability at the ending of page is needed. (!)


Yeah I plan to move the JS scripts just things like lazy load etc require them to render before the html. I just need to rewrite that.


A solution to do this is to insert a html widget at the end of the page and paste a necessary code into it.


Yes, thank you, today I also thought on that as a second bric. But the most user friendly way would be that the developpers will have the possibility to chose which js will be placed in head, which one before the closing < /body > tag and also an option to place libraries only once on a page, even when the User places multiple times the same bric on the same page. Otherwise if I create e.g. a special video bric, Users have in addition to the “special video bric” a “core” bric, which they have to place at the bottom of the page. When you use then a lot of brics from different developers, this will not be very user-friendly in my opinion.

So this is not a big problem, but would be nice if this could be optimised in the future.