Solved

Google Chrome - Wipe history via GPO

Posted on 2016-10-12
15
216 Views
Last Modified: 2016-10-28
We need to reduce the amount of space taken up in roaming profiles.
I am curious about the "SavingBrowserHistoryDisabled" setting in the ADMX for Google Chrome.

From the description, it looks like the user isn't able to retain any history at all during their session.
I am envisioning some kind of issue where a website needs to store something during a session.
Does this setting cause problems like that? (looking for answers from those who have used this setting before)

Is there a better setting to use that will wipe Chrome history on browser exit or computer logoff?
0
Comment
Question by:Paul Wagner
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 7
15 Comments
 
LVL 1

Expert Comment

by:Tim Berry
ID: 41841018
How I understand it,  I think the history is just that.... a log file of where you have been and when.

When the browser needs to save something during a session, most of them use cookies I believe.

I use the setting on browser exit to wipe my tracks.  So others that use my pc/account cant see where I have been. I have had no issues with with data that web sites need to store during session.
0
 
LVL 54

Accepted Solution

by:
McKnife earned 500 total points
ID: 41841473
To save space, one deletes the browser cache, not the history.
Use a script:
forfiles /p "%localappdata%\Google\Chrome\User Data\Default\Cache" /d -14 /S /c "cmd /c del @file /s /q
forfiles /p "%localappdata%\Google\Chrome\User Data\Default\Media Cache" /d -14 /S /c "cmd /c del @file /s /q
forfiles /p "%localappdata%\Google\Chrome\User Data\Default\File System" /d -14 /S /c "cmd /c del @file /s /q
forfiles /p "%localappdata%\Google\Chrome\User Data\Default\Application Cache\Cache" /d -14 /S /c "cmd /c del @file /s /q
forfiles /p "%localappdata%\Google\Chrome\User Data\Profile 1\Cache" /d -14 /S /c "cmd /c del @file /s /q
forfiles /p "%localappdata%\Google\Chrome\User Data\Profile 1\Media Cache" /d -14 /S /c "cmd /c del @file /s /q
forfiles /p "%localappdata%\Google\Chrome\User Data\Profile 1\File System" /d -14 /S /c "cmd /c del @file /s /q
forfiles /p "%localappdata%\Google\Chrome\User Data\Profile 1\Application Cache\Cache" /d -14 /S /c "cmd /c del @file /s /q

Open in new window

This deletes chrome's crap that is older than 14 days. We run it using a scheduled task every day, you could trigger it to run at logon for example with a 1 minute delay, so no one will be bothered. Tasks can be deployed by GPO.
0
 
LVL 5

Author Comment

by:Paul Wagner
ID: 41847303
@Tim - Good clarification. I meant to talk about disk cache and not history/cookies.

@McKknife - Where would I put you code in my existing script? Before goto END?

@echo off
if %os%==Windows_NT goto WINNT
goto NOCON

:WINNT
echo .Using a Windows NT based system
echo ..%computername%

echo Delete Google Earth Cache
del /q /f /s "%USERPROFILE%\AppData\LocalLow\Google
echo deleted!

goto END

:NOCON
echo Error...Invalid Operating System...
echo Error...No actions were made...
goto END

:END

Open in new window

0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
LVL 54

Expert Comment

by:McKnife
ID: 41847326
Yes, why not.
0
 
LVL 5

Author Comment

by:Paul Wagner
ID: 41847398
Does running it like you have it cause problems 14 days later?
Ex: A user has their password/session/"whatever" saved on a website. Now that 14 days has passed since they first set it up, the "whatever" is gone and they have to do it over again?
0
 
LVL 54

Expert Comment

by:McKnife
ID: 41847789
Website passwords are not cleared. "Sessions saved on websites" - now what should that be? You need to be more specific. We have been using this for years with all our users - no complaints at all.
0
 
LVL 5

Author Comment

by:Paul Wagner
ID: 41849126
Passwords sticking around is actually a good thing.

Maybe I worded the question incorrectly. No matter to pursue the issue. I wanted to know if there were any outlying issues and you have answered that.

I'll run a test on it today and see how it goes.
0
 
LVL 5

Author Comment

by:Paul Wagner
ID: 41850455
Why do you think it's better to run this particular script at logon rather than logoff? Is there a benefit to doing it that way?
0
 
LVL 54

Expert Comment

by:McKnife
ID: 41850522
You'd use task scheduler. T.S. knows logon triggers as well as delayed start. It won't be noticed when started delayed. T.S. does not know logoff triggers.
0
 
LVL 5

Author Comment

by:Paul Wagner
ID: 41850896
Gotcha. I'm looking to run the script via GPO. Any benefit to using one over the other?
0
 
LVL 54

Expert Comment

by:McKnife
ID: 41851026
Since the deletions will not take forever (at least not after it had run for the first time), it is all the same. Logon, logoff, do whatever you like.
0
 
LVL 5

Author Comment

by:Paul Wagner
ID: 41861331
- The "Cache" folder in "Default" that you listed does show for most of my users, but it does on a few.
- File System doesn't seem to take up any space, really. What was the reason for adding it?
- Profile 1 folder does not show in my computer or for any end users in the VDI.
- I added JumpListIcons and JumpListIconsOld since they take up a good amount of space.

How do I modify it to not wait 14 days? I want to delete the data regardless of age.
Would it be "/d -0"?
The issue we face is that people just disconnect from the VDI and never log off.

Would I do this?
del /q /f /s "%USERPROFILE%\AppData\Google\Chrome\User Data\Default\Media Cache"

Here is what I have now for the script:
@echo off
if %os%==Windows_NT goto WINNT
goto NOCON

:WINNT
echo .Using a Windows NT based system
echo ..%computername%

echo Delete Google Chrome Cache
forfiles /p "%localappdata%\Google\Chrome\User Data\Default\Media Cache" /d -14 /S /c "cmd /c del @file /s /q
forfiles /p "%localappdata%\Google\Chrome\User Data\Default\File System" /d -14 /S /c "cmd /c del @file /s /q
forfiles /p "%localappdata%\Google\Chrome\User Data\Default\Application Cache\Cache" /d -14 /S /c "cmd /c del @file /s /q
forfiles /p "%localappdata%\Google\Chrome\User Data\Default\JumpListIcons" /d -14 /S /c "cmd /c del @file /s /q
forfiles /p "%localappdata%\Google\Chrome\User Data\Default\JumpListIconsOld" /d -14 /S /c "cmd /c del @file /s /q
echo deleted!

goto END

:NOCON
echo Error...Invalid Operating System...
echo Error...No actions were made...
goto END

:END

Open in new window

0
 
LVL 54

Expert Comment

by:McKnife
ID: 41861725
Cache folder -  Leave it in the script, it will eventually be created.
-File System can take up space after people do certain downloads. I have seen GBs in there.
-Profile 1 is only used if people use chrome with different profiles - experts do. Non-experts don't even know how.
-Jumplisticons - why not.

14 days: yes, the number 14 stood for the 14 days. Setting it to zero makes no sense as this is a cache. Deleting cache files immediately is against the logic of a cache. A cache is used so that people don't download files over and over.
"The issue we face is that people just disconnect from the VDI and never log off" - ok, then deploy a scheduled task that runs at a certain time of the day and use the user that is currently logged on as executor as seen here:
Screenshot
0
 
LVL 5

Author Closing Comment

by:Paul Wagner
ID: 41863163
I changed the time to 5 days. We want to cut down on space usage as much as possible, but I do see your point about retaining a cache.
We will forego using task scheduler as this will likely cause grief with users who leave documents and web tabs open. Knowing my environment and people, they would be upset to find we logged them off.

I've tested the script on a few test accounts and it is working great. Thanks for all of your help!
0
 
LVL 54

Expert Comment

by:McKnife
ID: 41863607
You're welcome.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
This Micro Tutorial will demonstrate Google Calendar to monitor updates with top sites, such as Facebook, Google, Twitter, etc. with Marketing News. Each update of Google Calendar can be monitored, correlate dips and spikes in your website traffic, …
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question