Link external script with http

Hi,
when adding a link to an external script, it is translated into http:// or https://

Is there a way to have as final result something like:

Thanks !

Can you clarify your question a bit more. I’m not quite sure what it is you’re asking.

Sure.
I’d like to link the script “dist/serviceops.bundle.js” as an external link.
See screenshot.
external_link
The only possibility seems to be to either enter http:dist/serviceops.bundle.js or https:dist/serviceops.bundle.js

which results in the html file being
and chrome browser tries to load https://dist/serviceops.bundle.js

I would like to generate a code like

similar to the one automatically generated:

Thanks for any hint !

Sorry I meant that it generates src=“https:serviceops.bundle.js” for the script and I would like to obtain src=“serviceops.bundle.js” without the http: in front

Just import it to your JS folder. From there tell it which pages you want it to go to (right click the file once imported and options are there for Visibility). Then it will show up at the bottom with the rest of the JS files. Also be sure to check file order of the JS files if you have any issues with it at first. Hope that helps. :slight_smile:

Thanks for the tip.
The challenge is that each time you modify the script, you have to export each page which is using it. A bit painful !

Actually (and correct me if I’m wrong all you programmers out there lol) I believe that when it comes to JS and even CSS files you “could” change them externally and just not replace them when exported. You can just “import” the externally edited JS and/or CSS when you open the program next time and it will be up to date. Doubtful you would need to do this with CSS, but it would work the same I believe.

The other way would be to make the JS files (not CSS, not a good idea on doing this for those) a CDN so that they are linked externally. That way, although you have the best of both worlds. You can then edit them externally any time you want to and when you open the app it will read the updated versions I believe.

So there are choices here that can save you time depending on how you work with your files. Me I just replace it all, I mean think about it, If you edit it within the app it only takes a couple minutes or less to export the files and then upload them. I tend to export them to a separate location where I can keep each edit’s backup files in case I need to go back. Then I copy those to the production directory.

Oh one other little tip that saves time too. I hardly ever upload my image folders completely except for when I first start the project. Unless I do galleries for someone later, I hardly ever add images or if I do it’s only a couple or so. In this case I just navigate to them in the FTP program and upload the edited or added ones. Saves time if you have an image heavy website, and even if you don’t. :slight_smile: