Question

I'm using node-webkit to create a desktop application from an intranet site with a lot of external scripts and stylesheets. An issue I've noticed when debugging is that it seems to cache the external scripts and stylesheets sporadically between different runs - sometimes it will load a recently modified script and other times it will not without turning on the addressbar and typing the script path in manually then hitting reload. Is there any way to make it so every time it loads it is getting a fresh copy of the dependencies?

The package.json I'm using is below:

{
    "name": "name",
    "description": "description",
    "version": "0.1",
    "main": "https://path-to-intranet-site/",
    "node-remote": "https://path-to-intranet-site",
    "window": {
        "show": true,
        "toolbar": true,
        "frame": true,
        "position": "center",
        "width": 800,
        "height": 600,
        "min_width": 220,
        "min_height": 220
    }
}
Was it helpful?

Solution

try to edit package.json as follow:

{
    "name": "name",
    "description": "description",
    "version": "0.1",
    "main": "https://path-to-intranet-site/",
    "node-remote": "https://path-to-intranet-site",
    "webkit": {
         "page-cache":false
    },
    "window": {
        "show": true,
        "toolbar": true,
        "frame": true,
        "position": "center",
        "width": 800,
        "height": 600,
        "min_width": 220,
        "min_height": 220
    }
}

OTHER TIPS

In the documentation of Manifest format page-cache by default is false in the node-webkit wiki page.

Search in page for page-cache is is a little down.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top