I'm using a HTML page declared in HFS as an index to serve.
In this page, I use Javascript to import HTML partials (it works, I've tested and validated it).
I then use a second JS script to operate on those snippets included in the main HTML.
Problem :- The second script seems to fail because it doesn't find the nodes he's attempting to target. Indeed, when using console.log() function, it returns an empty node. Yet, both script are loaded at the end of the page, and the second script even wait for the complete loading of the page (in wich the first script import the partials). Also, I've used various technics like async functions, pauses, or await (to wait the first functions to load), with no result.
- When using the Google Chrome inspector, in the "Console" tab, I see that the node is empty (when using console.log() to debug).
- Sometimes it works, especially when I change the content of the 2nd JS script and refresh the page, indicating that a cache problem might occur. But as soon as I push the F5 key again, the script fails again, with the same error messages (again, this is a hint of a cache in action).
Debuging :Everything works fine if I
don't use the
first script and just plain copy/paste the snippets in the main HTML, meaning that the 2nd script works.
But it doesn't work anymore if use the importation system :
however, I can see in the source code of the page (fully loaded) that the snippets are correctly included.
Important information :- I checked the "Disable cache" option in the "Network" tab of the inspector.
- I spam F5, Shift+F5, CTRL+F5, with no result.
-
I use a DYNDNS to reach my own machine. I use this because : 1) I needed to host the HTML under a server for JS importation to work (because of
CORS block), 2) I use a second machine to reach the HTML hosted on the first one, and 3) OBS Studio doesn't allow to reach a LAN machine, he wants a WAN address.
Actual conclusion :- If Google Chrome doesn't cache, it may be the server serving files who does it.
QUESTIONIs HFS v2 caching things ? If yes, how to disable it for a specific index served ?