An open community 
of Macintosh users,
for Macintosh users.

FineTunedMac Dashboard widget now available! Download Here

Previous Thread
Next Thread
Print Thread
Page 1 of 2 1 2
Fix for macfixitforums archive slow loading
#871 08/11/09 12:15 PM
Joined: Aug 2009
OP Offline

Joined: Aug 2009
So I was looking at archive.macfixitforums.com and I found that the page loads were being held up by a couple of links to an ad server called madstage.com.com that wasn't responding. If you block that domain with an ad blocker or add the following to your /private/etc/hosts file, it loads quickly again.

127.0.0.1 madstage.com.com

Then in the Terminal, clear your DNS cache with:

dscacheutil -flushcache

Last edited by Kevin M. Dean; 08/11/09 12:49 PM.

iMac 2.7 GHz Core i5, 12 GB RAM, OS X 10.9, Int SATA 1 TB, Ext Fire 2 TB / 1 TB / 1 TB / 500 GB / 300 GB
Former MacFixIt Forums member since 11/17/99
www.rhubarbproductions.com
Re: Fix for macfixitforums archive slow loading
Kevin M. Dean #872 08/11/09 01:40 PM
Joined: Aug 2009
Likes: 7
Online

Joined: Aug 2009
Likes: 7
Great tip! That worked. I couldn't find /private/etc/hosts with Spotlight, Easy Find or Find Any File but blocking that domain with Saft and clearing the DNS cache seemed to do the trick.


Jon

macOS 11.7.10, iMac Retina 5K 27-inch, late 2014, 3.5 GHz Intel Core i5, 1 TB fusion drive, 16 GB RAM, Epson SureColor P600, Photoshop CC, Lightroom CC, MS Office 365
Re: Fix for macfixitforums archive slow loading
jchuzi #873 08/11/09 02:03 PM
Joined: Aug 2009
Likes: 1
Moderator
Offline
Moderator

Joined: Aug 2009
Likes: 1
Originally Posted By: jchuzi
I couldn't find /private/etc/hosts with Spotlight, Easy Find or Find

Check out Mac OS X: How to Add Hosts to Local Hosts File and How to edit the hosts file in Mac OS X – Leopard for some details.


alternaut moderator
Re: Fix for macfixitforums archive slow loading
alternaut #875 08/11/09 02:35 PM
Joined: Aug 2009
OP Offline

Joined: Aug 2009
While there's a lot of multi-step processes to editing the Hosts file, one of the easiest for people with BBEdit is:

1. In the Finder, go to the "Go" menu and select "Go to Folder...", then enter:

/private/etc/

2. Then drag the "hosts" file to BBEdit. You may also want to create an alias to the hosts file on your desktop or somewhere if you want to get to it quicker later.

3. Start making a change and BBEdit will prompt you to Unlock the document. Then when you save, BBEdit will prompt you for your root password.


iMac 2.7 GHz Core i5, 12 GB RAM, OS X 10.9, Int SATA 1 TB, Ext Fire 2 TB / 1 TB / 1 TB / 500 GB / 300 GB
Former MacFixIt Forums member since 11/17/99
www.rhubarbproductions.com
Re: Fix for macfixitforums archive slow loading
jchuzi #876 08/11/09 02:40 PM
Joined: Aug 2009
OP Offline

Joined: Aug 2009
To find system files in the Finder, do a Command-F. Click on the pop-up menu with "Kind" in it and go down to "Other...". Check the box next to "System Files". Back in the Find window set the System Files option to "include" and now when you search for "hosts" you'll find the hidden file.


iMac 2.7 GHz Core i5, 12 GB RAM, OS X 10.9, Int SATA 1 TB, Ext Fire 2 TB / 1 TB / 1 TB / 500 GB / 300 GB
Former MacFixIt Forums member since 11/17/99
www.rhubarbproductions.com
Re: Fix for macfixitforums archive slow loading
Kevin M. Dean #878 08/11/09 03:26 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
Guess that explains why I haven't been able to replicate the slow load times: I always have AdBlock Plus running in Firefox.


Keeper of the Magic Nickel
Re: Fix for macfixitforums archive slow loading
Kevin M. Dean #904 08/11/09 11:34 PM
Joined: Aug 2009
Likes: 3
Moderator
Offline
Moderator

Joined: Aug 2009
Likes: 3

This works with BBEdit's freeware sibling TextWrangler as well.

Folks might want to first copy the hosts file (I copied with command-C, then pasted right back into /private/etc/, whereupon hosts copy was created), so that if anything somehow gets terminally florfed in the editing process, it's easy to recover.



dkmarsh—member, FineTunedMac Co-op Board of Directors
Re: Fix for macfixitforums archive slow loading
donikatz #1295 08/17/09 09:41 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
Originally Posted By: donikatz
Guess that explains why I haven't been able to replicate the slow load times: I always have AdBlock Plus running in Firefox.


I just tried that. I got this:

Firefox prevented this site (adblockplus.org) from asking you to install software on your computer.

Then I went to Firefox prefs and enabled pop-ups and tried again. Same thing.

Re: Fix for macfixitforums archive slow loading
Bensheim #1296 08/17/09 09:49 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
You have to click "Allow" on the security bar that pops up. It's a default security measure.


Keeper of the Magic Nickel
Re: Fix for macfixitforums archive slow loading
Kevin M. Dean #1491 08/19/09 05:12 PM
Joined: Aug 2009
Likes: 1
Online

Joined: Aug 2009
Likes: 1
Originally Posted By: Kevin M. Dean
To find system files in the Finder, do a Command-F. Click on the pop-up menu with "Kind" in it and go down to "Other...". Check the box next to "System Files". Back in the Find window set the System Files option to "include" and now when you search for "hosts" you'll find the hidden file.


Right. Maybe I'm the only one who tried to follow those steps. It "found" "more than 10,000 files". From the above, I'm not even sure what file amongst them I would be looking for.

It's no big deal to me. I doubt I'll be searching the MFI archives very often. I just clicked on a link to them in another thread out of curiosity. Just thought I'd report on what happened.

Re: Fix for macfixitforums archive slow loading
Gregg #1508 08/19/09 08:26 PM
Joined: Aug 2009
OP Offline

Joined: Aug 2009
Originally Posted By: Gregg
Originally Posted By: Kevin M. Dean
To find system files in the Finder, do a Command-F. Click on the pop-up menu with "Kind" in it and go down to "Other...". Check the box next to "System Files". Back in the Find window set the System Files option to "include" and now when you search for "hosts" you'll find the hidden file.


Right. Maybe I'm the only one who tried to follow those steps. It "found" "more than 10,000 files".


Seems quite a bit when searching on the word "hosts". Initially when searching "This Mac" I get 598 items and then just switching to "File Name" instead of "Contents" brings it down to 76 items.

You can further narrow it down by adding the search parameter "Name" as set it to "is" and type "hosts" there and it brings it down to 8 items. Selecting the results one by one will show the path below and for me the first one listed is the /private/etc/hosts file.


iMac 2.7 GHz Core i5, 12 GB RAM, OS X 10.9, Int SATA 1 TB, Ext Fire 2 TB / 1 TB / 1 TB / 500 GB / 300 GB
Former MacFixIt Forums member since 11/17/99
www.rhubarbproductions.com
Re: Fix for macfixitforums archive slow loading
Kevin M. Dean #1512 08/19/09 08:52 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
The real UNIX file path is /etc/hosts (/private is an Applization), so the easiest way to edit it is to just use Terminal, since it isn't view restricted like the Finder.

sudo nano /etc/hosts

Last edited by donikatz; 08/19/09 08:56 PM.

Keeper of the Magic Nickel
Re: Fix for macfixitforums archive slow loading
donikatz #1527 08/19/09 11:03 PM
Joined: Aug 2009
Likes: 3
Moderator
Offline
Moderator

Joined: Aug 2009
Likes: 3

Quote:
...the easiest way to edit it is to just use Terminal...

Well, that's entirely dependent on what you're familiar with. I suspect that someone who's never used nano will find that environment a bit more confusing than the small amount of file manipulation required to open, edit and save /etc/hosts in a GUI text editor.

If you're going to suggest

sudo nano /etc/hosts

then you might want to explain how the reader should go about doing things like, say, moving the insertion point and saving the changes.



dkmarsh—member, FineTunedMac Co-op Board of Directors
Re: Fix for macfixitforums archive slow loading
dkmarsh #1531 08/19/09 11:58 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
Quote:
you might want to explain how the reader should go about doing things like, say, moving the insertion point and saving the changes.


Move the cursor with the arrow keys and save the changes following the on-screen instruction right at the bottom. smirk


Keeper of the Magic Nickel
Re: Fix for macfixitforums archive slow loading
donikatz #1539 08/20/09 01:34 AM
Joined: Aug 2009
OP Offline

Joined: Aug 2009
Originally Posted By: donikatz
The real UNIX file path is /etc/hosts (/private is an Applization)


While true... in Appleland /etc is a symbolic link and /private/etc is the actual path, so I prefer to provide the actual path in these cases.


iMac 2.7 GHz Core i5, 12 GB RAM, OS X 10.9, Int SATA 1 TB, Ext Fire 2 TB / 1 TB / 1 TB / 500 GB / 300 GB
Former MacFixIt Forums member since 11/17/99
www.rhubarbproductions.com
Re: Fix for macfixitforums archive slow loading
Kevin M. Dean #1541 08/20/09 01:59 AM
Joined: Aug 2009
Offline

Joined: Aug 2009
Yep, you're entirely correct. That's what I get for being a heavy cross-platform guy...

I guess the main point of my suggestion was Terminal, though. I usually find it easier to describe than several Spotlight steps. In my own experience, many users find Spotlight very confusing, while they're okay with CLI as long as they're given an exact command to type. At the office we had so many Spotlight complaints when we upgraded to Leopard that we had to buy a third-party util. Still, I'll admit I was overly definitive; one man's easy is another's whoah!/woe.


Keeper of the Magic Nickel
Re: Fix for macfixitforums archive slow loading
donikatz #1558 08/20/09 11:11 AM
Joined: Aug 2009
Likes: 3
Moderator
Offline
Moderator

Joined: Aug 2009
Likes: 3

But the original suggestion was not to use Spotlight to find the hosts file in question; that can be done using Finder's Go to Folder… command. The Spotlight issue arose as a secondary discussion when Jon mentioned that he "couldn't find /private/etc/hosts with Spotlight."



dkmarsh—member, FineTunedMac Co-op Board of Directors
Re: Fix for macfixitforums archive slow loading
dkmarsh #1562 08/20/09 11:45 AM
Joined: Aug 2009
Offline

Joined: Aug 2009
... and my reply was to THAT part of the thread...


Keeper of the Magic Nickel
Re: Fix for macfixitforums archive slow loading
donikatz #1563 08/20/09 12:15 PM
Joined: Aug 2009
Likes: 3
Moderator
Offline
Moderator

Joined: Aug 2009
Likes: 3

I can't tell if you're being deliberately obtuse or have just been a power user too long to see how illogical your argument is.

If you're suggesting using Terminal to find the hosts file in question, your suggestion of sudo nano /etc/hosts is irrelevant; it only "finds" the specific file because it's given the path as an argument! If you already know the path, then using Finder's Go to Folder… command is what you'd use in the GUI, not Spotlight. (Yes, you'd enter /etc, not etc/hosts.)

If, on the other hand, you're suggesting using Terminal to edit the file, that's a different matter; I don't think nano's interactive interface will come very naturally to the sort of person who's "okay with CLI as long as they're given an exact command to type," since your one-liner gives them no clue as to how to navigate once they're in nano, but maybe that's just me.

But if you're championing Terminal as the easy route to editing, then there's no relevant comparison with Spotlight; Spotlight has nothing to do with editing.




dkmarsh—member, FineTunedMac Co-op Board of Directors
Re: Fix for macfixitforums archive slow loading
dkmarsh #1570 08/20/09 01:23 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
Many people looking at this topic may see the thread about finding the file with Spotlight and think that's the way to go, confusing the other part. I was pointing out that the easier way is to not find it, to just use Terminal. Yes, "easiest" is always subjective. Anyone who has ever done tech support knows 10 techs will have 20 different "easiest" ways to do something. For some people Go To is the easiest. For some people Terminal is the easiest. Rarely would Spotlight be the easiest. I'll stick with my opinion and you can stick with yours. This is a Lounge thread, after all.


Keeper of the Magic Nickel
Re: Fix for macfixitforums archive slow loading
Kevin M. Dean #2351 08/29/09 02:04 AM
Joined: Aug 2009
Offline

Joined: Aug 2009
The first half of this thread was something I was able to understand most of, but once past that, I found that as is often the case, everything was way over my head. I will now try reading it again while standing on a ladder.

Re: Fix for macfixitforums archive slow loading
dkmarsh #2917 09/04/09 09:21 PM
Joined: Sep 2009
Offline

Joined: Sep 2009
Originally Posted By: dkmarsh
This works with BBEdit's freeware sibling TextWrangler as well.

Folks might want to first copy the hosts file (I copied with command-C, then pasted right back into /private/etc/, whereupon hosts copy was created), so that if anything somehow gets terminally florfed in the editing process, it's easy to recover.

I will add that TextWrangler has an "Open Hidden" item in its File menu -- which makes navigating to any folder (via the dialog box) quite simple.

Plus, the full path to the hosts file was already given in post #1 (so "finding" it seems somewhat superfluous).

PS: TW's prefs can be set to save a (timestamped) backup, anywhere we desire.
[and yes, it also handles authorizations... so we can edit root-owned files.]

Last edited by Hal Itosis; 09/04/09 09:26 PM.
Re: Fix for macfixitforums archive slow loading
donikatz #4789 10/07/09 10:51 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
Quote:
guess the main point of my suggestion was Terminal, though.

Doni, you are quite right! I am less than a newbie on Terminal but did it from A to Z without any searches. First, thanks to Alternaut for great links! The invisible host file cannot be edited directly because even the admin user cannot save the edits; this is why BBEdit and the likes were suggested. But many do not have this/do not know how to use it, and have no ad blockers. So, I just followed the instructions in one of the Alternaut's links to edit the file in Terminal and flush the caches there too. The instructions are explicit (I did not put any $ sign before the command) and it worked even in Snow Leopard. The link I used was this:
http://decoding.wordpress.com/2009/04/06/how-to-edit-the-hosts-file-in-mac-os-x-leopard/
Hope this is helpful for dummies like me.


Alex
3.1 GHz 13" MacBook Pro 2015, 8 GB RAM, OS 10.11.2, Office 2011, TimeWarner Cable
2.8 GHz Xeon Mac Pro 2010, 16 GB RAM, OS 10.11.2, Office 2011, LAN
Re: Fix for macfixitforums archive slow loading
macnerd10 #4810 10/08/09 09:36 PM
Joined: Aug 2009
Likes: 1
Moderator
Offline
Moderator

Joined: Aug 2009
Likes: 1
Glad to hear you found those links useful. laugh That said, and once gone through the motions, you might want to revisit Hal’s ‘one-stop shopping’ suggestion of the freeware text editor TextWrangler. I found TW’s "Open Hidden" command* (File menu) using the file path provided above (/private/etc/hosts) a surprisingly handy way to edit Hosts files. Of course, there's no arguing about taste... tongue


*) UPDATE: according to its Release Notes, starting with TextWrangler 3.5, the "Open Hidden" command has been removed from the File menu, since the "Show Hidden Items" check box is available [in the file dialog box, alt] on all supported systems now".

Last edited by alternaut; 01/15/12 08:48 PM. Reason: TextWrangler changes

alternaut moderator
Re: Fix for macfixitforums archive slow loading
alternaut #4811 10/08/09 10:14 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
True, but for Terminal (which is built-in) one does not need anything else once they have your link. Thanks again! Did it on two machines, one 10.5.8, the other 10.6.1 and both worked. Stumbled only once: after using control-O for save one needs to hit return for the save to register. Once figured that out, the second try was a breeze.


Alex
3.1 GHz 13" MacBook Pro 2015, 8 GB RAM, OS 10.11.2, Office 2011, TimeWarner Cable
2.8 GHz Xeon Mac Pro 2010, 16 GB RAM, OS 10.11.2, Office 2011, LAN
Page 1 of 2 1 2

Moderated by  alternaut, cyn 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.4.33 Page Time: 0.042s Queries: 65 (0.029s) Memory: 0.7100 MB (Peak: 0.8904 MB) Data Comp: Zlib Server Time: 2024-03-28 17:20:07 UTC
Valid HTML 5 and Valid CSS