Webflow development: How to integrate (global) custom JS code for best performance?

25 views Asked by At

so I have multiple clients and some of their webflow projects are getting a bit out of hand with custom scripts i had to create for multiple functionalities. My main question is: How do you integrate/include that custom vanilla JS + CSS code in webflow?

paste it un-minified directly into the custom code section in the settings paste it minified directly into the custom code section (my current approach) use your own webserver to serve a //custom.code/repo.min.js and include that into the custom code section something else I couldn’t think of yet?

Also, do you build your JS? i’m wondering how the SEO stats might go up or down if I don’t include libraries directly (for example: <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.css" />), but build a whole package with Gulp and serve that instead of 5 libraries that point to 5 different places on the internet.

If i serve that whole package: should I serve it via my own webserver or paste it minified in the custom code section?

sooo many questions. my performance measurements are all over the place (since my web projects are quite small). anyone have some good measurements at hand or could point me to some good practices for fast performance?

Thank you!

I tried different approaches of minifying my code, serving it from my own server, but haven't gotten any good performance measurements that point me into the right direction. i basically need advice for best pracitce...

0

There are 0 answers