Challenge functionality when offline

Hi, thank you so much for this wonderful project!

I have a question. I am running fcc offline because I am often working without an Internet connection.

Overall, it works well, but I have noticed some functionality is not available.

For example, the challenge Target HTML Elements with Selectors Using jQuery in the “Front End Development Libraries” curriculum does not fully work. When I add the code requested in the challenge, I don’t get the “bounce” effect. But when I check the code it is passed as correct.

It says in the instructions: " Note that we’ve already included both the jQuery library and the Animate.css library in the background so that you can use them in the editor. So you are using jQuery to apply the Animate.css bounce class to your button elements".

It looks like these resources are only loaded when I am working online, am I right?

Is there any workaround to getting this working offline?

Thanks again.

PS I am also getting this error when offline: “ReferenceError: Can’t find variable: $”

Hello there,

As you mentioned, yes, there are a few challenges throughout the curriculum that fetch tooling on-demand. That is, they make a fetch to a CDN on page load for specific challenges.

Not easily.

A few Campers run freeCodeCamp locally, and have changed the codebase to build with all necessary assets. However, this does require quite a bit of tinkering with the codebase as well as a decent knowledge of how it works.

Otherwise, as far as I am aware, browsers cache popular CDN links/scripts. I imagine this only works for specific versions, and I do not know the other limitations, but the idea should be:

  1. Load a webpage fetching https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js
  2. Browser caches script
  3. Visit a completely different webpage requiring same version of script
  4. Browser loads cache

I do not know if this is:
a) Limited to each platform domain
b) Limited to specific CDN domains
c) Works in current/all browsers - might need configuring

Hope this clarifies.

Thanks so much for the helpful reply.

I will experiment with your suggestions and see what happens.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.