CDN JS not being included?

Hi i followed the tutorial on importing / linking an external CDN JS file. I see it listed under JavaScript in the Design block, but it never gets added to the head of the page. It does not show up in the previews nor in the exported site.

Check the bottom of the page, JS usually is not added to the Head anymore.

Thanks jo-r, I should have looked there, expect that the documentation stated that it would be included in the head. It would be nice to have control over this with defer/async options as well.

placing javascript in head is not a good practice, as it will slow down the page downloading and rendering. This is why Boostrap Studio place all JS at the end of the body, just as expected.

I think this depends on the designer. I, and many others believe that the body should be semantic markup only. The current, more correct way to achieve this is to define defer/async methods which allow parallel or deferred loading of these files.

I would prefer to have control over this and to utilize the newer methods to improve code readability and to be able to organize the dependencies more clearly.

It’s been requested by me (and others) for over 6 months. See this post…

1 Like

If I recall I think I read in here somewhere that Martin said this would be added in one of the up coming updates. If I read it correctly that is lol. Pretty sure I did though.

I vaguely seem to remember that as well. I think it was in the post where we’d been discussing the desire to be able set the link target from the quick link feature in the top menu bar (eg. Default, Blank, Parent, Top) which exists now as of the most recent BSS update. Hopefully, the next update will have the options to add HTML where we want in the head, body, before, after, etc.

I have a 10 year old program called Website Realizer that allows you to add custom HTML anywhere… after the opening head tag, before the closing head tag, after the opening body tag, before the closing body tag, and it even allows you to add HTML before and after the page HTML generated by the program itself, which is helpful when you want to need execute some PHP before a page loads for password protection (although you can also do this in other ways, like via C-panel.)

Still, it would be nice to have the flexibility to just put stuff where we want it.

1 Like