HTML files need to be accessed in a server environment to load local JSON files. If you try to open the HTML file locally, the browser will block this action for security reasons.
To run the project, follow these steps:
-
Install Node.js and npm.
-
sudo npm install -g http-server
-
Navigate to the project directory.
cd dir
-
Start the server.
http-server
-
Visit
localhost
in your browser to access the Skills Network Graph.
If you make changes to the JSON file and the updates are not reflected when you refresh the page, you may need to force the browser to ignore the cached version. Here are a few methods you can try:
-
Force Refresh: Press
Ctrl + Shift + R
(Windows / Linux) orCommand + Shift + R
(Mac) in your browser to perform a force refresh. This will ignore the cache and reload all files. -
Clear Browser Cache in your browser settings.
-
Modify the URL or Add Query Parameters: Add a query parameter to the URL, such as
?version=123
, to ensure that the URL is different each time you access it. This will force the browser to reload the file without using the cache.
These methods should help you view the updated JSON file when you refresh the page.