Skip to content Skip to sidebar Skip to footer

Raspberry Pi - Flask Server Using Jquery Not Working Offline (online It Works)

I'm a beginner and I have what should be an easy problem to solve. However, after researching many forums and trying the technical solution, I could not make the code to work offli

Solution 1:

Try to create a static folder that will host all your js and other static files like below:

static/
     - js/
     - css/
     - ...

Now, put your jquery file in js/ folder and use the following in your template:

url_for('static', filename='js/jquery-1.9.1.min.js')

In your template, you will have:

<scriptsrc="{{ url_for('static', filename='js/jquery-1.9.1.min.js') }}"type="text/javascript"></script>

Post a Comment for "Raspberry Pi - Flask Server Using Jquery Not Working Offline (online It Works)"