A Conversation for "The Orchard" - the h2g2 Mac Users' Group!

Safari cache

Post 1

kea ~ Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the Galaxy lies a small, unregarded but very well read blue and white website

I've noticed recently that when I use the back button on h2g2 pages that the page takes a long time to load, as if it was a new page. Shouldn't it be loading from the cache and load much more quickly?

It also is happening on other sites but not so bad.

I posted this in Ask, but am reposting here because there was the suggestion that I'd changed the settings so that Safari is loading pages directly rather than from the cache. I can't find any way to do anything to the cache apart from emptying it. Any ideas?



Safari cache

Post 2

dElaphant (and Zeppo his dog (and Gummo, Zeppos dog)) - Left my apostrophes at the BBC

If your network connection is fast enough, you might not notice a difference between loading from the cache and loading from the network. There are other factors in page loading time, like how complex it is to render any tables or CSS positioning.

And it is possible for a web site to say "never cache this" - to make sure you get the most up-to-date version of a page, always. I don't think h2g2 does this, but maybe that has changed recently.

If you *really* want to know if you're loading from the network or a cache, you can watch the network activity while you browse using "tcpdump". smiley - geek
smiley - dog


Safari cache

Post 3

dElaphant (and Zeppo his dog (and Gummo, Zeppos dog)) - Left my apostrophes at the BBC

smiley - geekLike this (you'll need to use an account that can administer the computer):
1. Start up "Terminal" (you'll find it in your "utilities" folder inside your "Applications" folder, or in geekspeak, in /Applications/Utilities )

2. Type "sudo tcpdump port 80" and hit return.

3. You may see a warning about responsible behavior etc, but you should get a request for your password. Type it and hit return.

4. Watch terminal as you go to different web pages. You'll see all sorts of fascinating gobbledygook that represents the network traffic as you load each page. If you look closely you'll recognize the address of the pages you are going to. The first number on each line is the time.

5. Click "back", and look at terminal again. You should see nothing new if it loads from the cache, or a bunch more gobbledygook if it doesn't.

6. Quit terminal when you are done.
smiley - dog


Safari cache

Post 4

kea ~ Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the Galaxy lies a small, unregarded but very well read blue and white website

I tried that a few times, and various things happened including this:

>>
tcpdump: WARNING: en0: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on en0, link-type EN10MB (Ethernet), capture size 96 bytes
<<

But nothing after that when I'm browsing.

The no IPv4 bit was there all the times I tried I think.




Safari cache

Post 5

dElaphant (and Zeppo his dog (and Gummo, Zeppos dog)) - Left my apostrophes at the BBC

"en0" is probably your wired ethernet connection, so that means you're using some other connection. It's supposed to find the one your using, but you can try this instead:

sudo tcpdump -i en1 port 80

"en1" is usually your wireless connection.

If that doesn't work, open up "Network Utility" in your Utilities folder, and on the "info" tab there is a pop-up menu that lets you choose different network interfaces. Look at them all until you find the one that has all the information filled in and says the link status is "active". Then use the above command again, but put the name of your network interface (the part in parenthesis in the pop-up menu) after the "-i"
smiley - dog


Safari cache

Post 6

kea ~ Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the Galaxy lies a small, unregarded but very well read blue and white website

I'm on dial-up at the moment d'El.

I looked in the Network Utility thing under the info tab but none of the 3 options yielded an 'active' link status smiley - erm


Safari cache

Post 7

dElaphant (and Zeppo his dog (and Gummo, Zeppos dog)) - Left my apostrophes at the BBC

Oh. My mac doesn't even have a modem, so I have no idea how that would show up. Sorry.

If you want to give it one more go, you can try typing "ifconfig" in terminal. That will yield the same thing as Network Utility but much uglier to look at, and more detailed. Maybe that will show you your modem connection. Or maybe not. smiley - erm
smiley - dog


Safari cache

Post 8

kea ~ Far out in the uncharted backwaters of the unfashionable end of the western spiral arm of the Galaxy lies a small, unregarded but very well read blue and white website

With no dialup what do you when the broadband connection goes down smiley - winkeye

I did get a whole bunch of lines from ifconfig, but it's too confusing to makes sense of. Next time I'm on bb I'll try again smiley - cheers


Safari cache

Post 9

Kaz

Hello

Found this thread and was hoping you might be able to advise (searched apple.com to no avail)

Am using a leopard system and safari 3.1. I have the computer set up for five users (it's my folks laptop) Have noticed that on my sister's login and the admin account, safari seems to be using the documents folder as the cache. As well as her own files she has a load of random files in the folder that she knows nothing about. This is also on the admin account.
I have reset safari twice (the documents disappear from the folder when I do that) and repaired permissions on on her login and on the admin account. I have emptied the trash but the files keep reappearing. What is going on and how can I change the default folder for safari to save files to?

I am not getting this problem on my login. I haven't checked the other two yet.

Thanks

Kaz smiley - smiley


Safari cache

Post 10

dElaphant (and Zeppo his dog (and Gummo, Zeppos dog)) - Left my apostrophes at the BBC

That sounds odd. If the "Documents" folder really is being used as the cache, you'll see a series of numbered folders, and inside those more numbered folders, then the cache files. And where Safari puts that is not a user-accessible setting.

Are you sure it's the cache files you're seeing, and not something more common like downloaded files? You can change the default download location in Safari preferences, in the "General" tab. I suggest making a specific "Downloads" folder and using that, then you know for sure where the files came from. Create that folder in your sister's home folder, and you'll have the same setup that Leopard uses by default, so when/if you upgrade you won't need to change anything.

If that's not it, then you can delete the "com.apple.safari.plist" file in your sister's "Library" folder, and also delete the "Safari" folder that is inside the "caches" folder (still inside your sister's Library folder), as well as the "com.apple.safari" folder, also in the "caches" folder. That's essentially the same thing as resetting safari, but by deleting the folders you also remove the possibility that your sister somehow turned them into "aliases" for her Documents folder. It's *extremely* unlikely that she did that, but it's the only thing I can think of that could explain the cache being in the wrong folder.

It's much more common for someone to click a link without realizing that it causes a file download. I see that happen to lots of people, and they never know where all those files came from.
smiley - dog


Safari cache

Post 11

Kaz

thanks d'E you're a genius.


Key: Complain about this post

Write an Entry

"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."

Write an entry
Read more