Skip to content

disable chrome BrowserWindow caching #891

Closed

Description

@max-mapper

opening issue at the request of @zcbenz

my issue is that when using win.loadUrl chrome aggressively caches page contents, and I cant get it to load newer versions without reloading with devtools open and the 'disable cache while devtools is open' checked

to reproduce, clone this repo: https://github.com/maxogden/atom-shell-cache-bug

and then run:

npm install
npm start

you should see HELLOOOO in the app

now, quit the atom shell app, edit client/index.html in that repo to say something other than HELLOOOO and then run npm start again

it should still show HELLOOOO

also, @zcbenz and I looked briefly through http://peter.sh/experiments/chromium-command-line-switches/ but did not find one that seemed to do the trick. i also tried this but it doesn't fix the issue:

    win.loadUrl("http://localhost:8765")
    win.webContents.on('did-finish-load', function() {
      console.log('reloading')
      win.reloadIgnoringCache()
    })

Activity

  1. zcbenz commented on Dec 5, 2014

    @zcbenz
    Contributor

    node-webkit has an API (nwjs/nw.js#2707) to disable cache, I think we can move it to atom-shell.

  2. elbriga commented on Jan 5, 2015

    @elbriga

    Hi zcbenz!

    What is the location (on windows) that atom-shell uses for caching?

    I need to solve the cache problem badly! Is there plans to support the chromium command line switches for disaling cache completely?

    Thanks!

  3. zcbenz commented on Jan 5, 2015

    @zcbenz
    Contributor

    The cache is stored at require('app').getDataPath(), and unfortunately there is no command line switch in Chromium to disable cache.

  4. zcbenz commented on Jan 5, 2015

    @zcbenz
    Contributor

    From next release you can use --disable-http-cache switch command line switch to disable disk cache.

  5. Rameshv commented on May 18, 2015

    @Rameshv

    hi @zcbenz, it still caches the webview content. I have added the --disable-http-cache switch in app, but still it caches the webview..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions