I have this project structure:
/root /static script.js page.html This code:
<html> <head> <script src="/static/script.js"></script> </head> <body> ... </body> </html> results in:
Loading failed for the <script> with source “file:///static/script.js”. Why is that? I would expect it to search for static folder in current directory (i.e. root).
static/canvas.jsinstead of/static/script.js?/static/script.js- infile:///static/canvas.jsfile://is the protocol and the target is/static/canvas.js