Calling CSS / Js file from different Server

Hello everyone.

I am facing an issue of ton of CSS & Js code in header of my website and would like some insights about it.
Is it possible to call a CSS or Js file of my website stored on a different server?
Do webflow provide such feature? Because I tried using GitHub but the problem is, if GitHub goes down then my website get ruined as well. So, the idea would be to have a better approach to this.

I can’t provide read-only link to the website as it is my company’s website. However, a published link and snapshot is given.
Link: https://packagex.io/
Img:

Hi :slight_smile:

You can create a CDN in the cloudfare server:
https://www.cloudflare.com/en-gb/lp/ppc/cdn-x/?utm_source=google&utm_medium=cpc&utm_campaign=DG_EMEA_DACH_MLT_G_Search_Generic_Applications_CDN&utm_content=&utm_term=cdn&campaignid=17325777108&adgroupid=138497058713&creativeid=600093384201&&_bt=600093384201&_bk=cdn&_bm=e&_bn=g&_bg=138497058713&_placement=&_target=&_loc=9114118&_dv=c&awsearchcpc=1&gad=1&gclid=CjwKCAjwtuOlBhBREiwA7agf1kvLFojdSIqqyAdfiYreKOyVl_vNenpb0np6hOv2l1P_oZTpj31mHxoCUCAQAvD_BwE&gclsrc=aw.ds

1 Like

Hi Alexis, Let’s say I consider using Cloudflare cdn but what if i want to change something in the CSS file, do I have to re-add the whole file to the server again or will Cloudflare provide an easier way?

Absolutely.

No.

If GitHub goes down, something like 80% of the Internet would be broken.
But even there, when you serve your content, it is not coming from GitHub, it is coming from a CDN that you’ve deployed it to.

There are many ways to set this up, which one works for you depends on your development process and how frequently you make code changes.

Alex recommends Cloudflare, I haven’t used their CDN. I typically use GitHub for the repo and development ( codespaces ), and then jsDelivr for delivery of public repos, and Netlify for delivery of private repos.

You’ll have a bunch of learning to do to set this up, but it’s easy once you’re familiar with the pieces and how they connect.

2 Likes

He is right about the Github thing… A lot of projects are connect with Github, even more now! It is easier to down your project because Webflow than Github…

If you want something more dynamically, I would keep it on Github.

But answering your question, yes, Cloudflare provides you both option, being dynamic or static. But if you are new in the area, you will need more time to learn how to work with it.

Thks :smiley:

2 Likes

What if i want to change something on the webflow project link and will it automatically gets changed in the file i have stored in either GitHub or Cloudflare? Or do i have to manually change there as well?

Since we are using many of the third party scripts like tag manager, hotjar, etc. If some of these scripts get updated in the future and the old one is stored in my file, will that effect my website and do i have to replace the old one with new one too?

Hey :smile:

It will be automatically updated, webflow will integrate your code in CDN.

I was checking more option and I realized that finsweet for example, they use jsdelivr

And they have a lot of CDN that is automatically updated when they add new features

“jsDelivr is a free CDN for open source files. We are tightly integrated with Github and npm allowing us to automatically provide a reliable CDN service to almost every open source project out there.”

It looks an amazing option, have a look on the documentation, I think this will be the solution for your, because you can work with it in any javascript framework as well (React, Vue, Angular, even Wordpress).