Memory saver in Chrome

mforeman1
New Contributor III

Screenshot 2023-03-29 at 11.27.06 AM.pngHello Guys, Is there a way to automatically enable the memory saver in google chrome and add sites into "Always keep these sites active? maybe a Plist or Script? 

2 REPLIES 2

Jaykrishna1
Contributor II

Probably it is possible to enable the "Memory saver" feature in Google Chrome and add sites to "Always keep these sites active" using a Chrome policy or a script.

Here are the steps to achieve this:

  1. Create a text file with the following content:

{
"policy": {
"TabFreezingEnabled": false,
"EnableMemorySaver": true,
"EnableAutomaticTabDiscarding": true,
"WhitelistUrls": ["https://example.com", "https://example.org"]
}
}

 

Don't forget to Replace the example URLs with the websites you want to add to the whitelist.

  1. Save the file with a .json extension, for example, chrome_policy.json.

  2. Open Google Chrome and navigate to chrome://policy.

  3. Click the "Reload policies" button at the bottom of the page.

  4. Verify that the new policy has been applied by going to chrome://discards.

  5. You can also use a script to apply the policy. Here is an example script:

#!/bin/bash

policy='{
"policy": {
"TabFreezingEnabled": false,
"EnableMemorySaver": true,
"EnableAutomaticTabDiscarding": true,
"WhitelistUrls": [.     ]
}
}'

sudo /usr/bin/defaults write /Library/Managed\ Preferences/com.google.Chrome.plist Policy $policy

 

Note:- Replace the exple url

 

 

unfortunately, it didn't work for me. Have you tried and tested this script? @Jaykrishna1