JS files should load only where necessary.

I think there should be an option to choose on which pages should a certain JS file be inserted. For example:

When you right-click on a JS file from the JS menu on the right side, a menu just like for CSS files should open with a Properties entry. When you click on Properties there should be a dropdown menu where you can choose on which Page should that specific JS file be inserted. Values in that dropdown should be smthing like: All, index.html, page2.html, page3.html and so on...

+1

It's been brought up a few times so hopefully it's something we'll get in an update at some time. I like your idea of how it could work too, that would simplify things for the users.

Thank you for suggesting this feature! This would be a good addition to the program and we will add this in the future releases.

The only potential issue is that this will make minification more difficult. Right now if minification is enabled for the design, we generate a single min.js file that is included on all pages. On first page load, browsers cache this file, and all later page visits reuse the cached js. If scripts were included conditionally, we would have to include separate min.js files in different pages, making things a bit slower.

Of course, it might be a compromise that is worth it in some cases. What do you think?

I guess for me it would depend on where that compromising slowness occurs. If it's for exporting that wouldn't bother me at all. If you plan to do the exporting at all as people have suggested so that we can export specific things, then we can tell it if we need it exported or not each time etc. which will help some too.

During production I don't use the minify feature at all (and with some sites not at all because it does all one file which doesn't work for some of the custom components I've added), so if it's only going to affect exporting, even if the file choice for export isn't added, that's still not that bad as I'm only doing it when you're ready to upload.

For me, in the end, having separate minify files would be much better and more efficient as I could actually use that feature in some of my sites that I won't ever be able to use it in as it is now, unless of course I choose to use another minifyer outside of BSS for those sites.

I also feel this feature is required. But for minification this feature will complicate matters if some files are required in all pages some files are not required. Then different sets needs to be created to prevent reloading again.