Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

junkster

macrumors regular
Original poster
Nov 6, 2006
128
1
Clear Safari's cache and start private browsing mode. Go to YouTube and watch a few videos. You don't have to watch the whole thing, just until the entire video is buffered.

Now go to the "/var/folders" directory, either via the Terminal or the Go To Folder option in Finder. There are a couple of layers of folders with random names, but search around until you find a folder with Safari in the name, then go in there.

What I've found are entire youtube videos saved to disk. Privacy issues aside, Safari is writing gigabytes of video to my SSD for absolutely no reason.
 

GGJstudios

macrumors Westmere
May 16, 2008
44,556
950
Private Browsing stops Safari from storing cookies or history, but it doesn't stop it from downloading data from websites you visit. It has to download data in order to display websites properly. That's normal. When you've finished browsing, empty your cache.
 

junkster

macrumors regular
Original poster
Nov 6, 2006
128
1
I think you're missing the point, GGJstudios. Of course Safari has to download data in private browsing mode. But it does not need to write it to disk.

And on write-limited SSDs, is there really a reason for storing an entire video that you watched part of and will never watch again to SSD? No. Just buffer it to RAM and that's that.
 

GGJstudios

macrumors Westmere
May 16, 2008
44,556
950
I think you're missing the point, GGJstudios. Of course Safari has to download data in private browsing mode. But it does not need to write it to disk.

And on write-limited SSDs, is there really a reason for storing an entire video that you watched part of and will never watch again to SSD? No. Just buffer it to RAM and that's that.
Downloading IS writing to disk. Where else would it download to? Safari doesn't download anything to RAM. That's not the purpose of RAM.
 

junkster

macrumors regular
Original poster
Nov 6, 2006
128
1
Where else would it download to? Safari doesn't download anything to RAM. That's not the purpose of RAM.

Video, like any network traffic, is simply a stream of data coming over a TCP/IP socket. Writing that data to disk is not an intrinsic part of the process; it's something the application engineer has to write code to do. In fact on iOS videos are streamed directly to RAM with no disk writes involved.

There's no need for the Safari engineers to save out 50-100MB videos to a limited-write SSD. Period. There's lots more RAM on Mac compared to iOS, too.
 

GGJstudios

macrumors Westmere
May 16, 2008
44,556
950
Video, like any network traffic, is simply a stream of data coming over a TCP/IP socket. Writing that data to disk is not an intrinsic part of the process; it's something the application engineer has to write code to do. In fact on iOS videos are streamed directly to RAM with no disk writes involved.

There's no need for the Safari engineers to save out 50-100MB videos to a limited-write SSD. Period. There's lots more RAM on Mac compared to iOS, too.
I just stated how it works. They're not going to rewrite Safari because a user thinks they should. As I said, all you have to do is empty the cache after browsing. It's really not a problem. You're not going to wear out your SSD anytime soon, simply by browsing and streaming.
 

kaffee

macrumors newbie
Dec 26, 2012
1
0
When on a session in Safari (i.e. viewing videos, and not just on YouTube), the cached data is saved in:

(user/Home drive)/private/var/folders/...​

I'm still on Leopard and if you can't find this particular ".../var/folders/..." folder, note that it is within "private" which, as in my case, is grayed out and normally inaccessible via Finder.

So from "private," mine creates yet another subfolder:

(user/Home drive)/private/var/folders/tg/(then a temp folder)/-Tmp-/(then several folders, one named DDMCache)/~.avi (or whatever video file)​

- AND ANOTHER SUBFOLDER -

(user/Home drive)/private/var/folders/tg/(then a temp folder)/-Caches-/(several Safari files and some folders)/​

but where no cached video files are found.

After the movie has been fully cached, I move the ~.avi (or any cached video file) under "-Tmp-" to my/any appropriate folder.

Hope this helps.

Clear Safari's cache and start private browsing mode. Go to YouTube and watch a few videos. You don't have to watch the whole thing, just until the entire video is buffered.

Now go to the "/var/folders" directory, either via the Terminal or the Go To Folder option in Finder. There are a couple of layers of folders with random names, but search around until you find a folder with Safari in the name, then go in there.

What I've found are entire youtube videos saved to disk. Privacy issues aside, Safari is writing gigabytes of video to my SSD for absolutely no reason.
 

smellalot

macrumors 6502
Dec 6, 2011
277
2
Private Browsing stops Safari from storing cookies or history, but it doesn't stop it from downloading data from websites you visit. It has to download data in order to display websites properly. That's normal. When you've finished browsing, empty your cache.

You're skipping over the part where Safari's Private Browsing should empty the cache for you...

To heat up this discussion: does Chrome empty the cache for you?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.