Search code examples
electronchromium

Where does Electron save previous zoom?


Electron appears to remember what the zoom factor when restarting the app - where is this saved? I want to be able to reset this.

Thanks!


Solution

  • The zoom factor information for each browser window is memorized in a JSON file named Preferences located in the user data directory accessible through app.getPath ('userData');

    If the zoom factor is different from its default value 1.0, it will be listed at the end of the JSON file (after the DevTools settings), associated with the window's URL. You may find the whole relevant syntax quite odd though...