Link External JS (more settings)

Hi guys,
I need to insert a script before the /body tag. I am trying the Link External JS function, but it has only the src input.

I have to insert ID and DATA-HANDLER also.
Any advice? :grin:

You can try the Head Content settings in this case: HTML Editing | Bootstrap Studio

Hi, it seems to work that way too, but it would have been better to be able to put it at the bottom, before closing the body tag, to optimize the loading of the page scripts :slight_smile:


How hard would it be to do something like this? This would make a lot of things a lot easier for many of us.

1 Like

I am aware of this proposal, but it’s not clear what the use case would be for these options.

  • Before Body - Not sure what it would be useful for. If it’s for JS or CSS, After Head can do the same.
  • After Body - This is useful only for including JS. The same can be achieved by adding the defer keyword to script tags in After Head. (This is also what @Wizzy would need to do to optimize the loading performance.)
  • Before/After HTML - placing anything here would result in an invalid HTML document. I imagine this would be needed by users with advanced use cases, who would be better served by an export script.

Thank you @martin for the tip! :raised_hands:

Some people are not knowledgeable with writing code/scripts, but know how copy/paste stuff they find online. Being able to add before the HTML allows one to add PHP scripts that can run before the page loads. I think these options would serve some users. If they’re simple to add, and won’t hurt the program in any way, I don’t see the harm.