Thursday, March 22, 2012

No Ads, Thanks ... FiltersetP & Hosts File

This blog explains and OFFERS the 2 proven & excellent methods I use (and wrote) to stop ads during your "surfing," to speed up page loading for all sites and in the case of the 2nd method, the Hosts file - to help stop spammy links, tracking, web bugs, malware, popups & other intrusions or dangers. It doesn't require you to be a geeky tech-genius with computers; it DOES require you read instructions (rather simple ones) carefully and back up your current usercontent.css file in Firefox and HOSTS file in Windows or Linux before editing them (appending them) with the files I'll link you to. OK, now the good part:

No one I've ever met enjoyed reading ads :-) This will explain 2 simple methods of eliminating "98%" of them on all websites WITHOUT installing some "adblocking/thwarting extension." I remember installing a couple of those; in fact I beta tested the "successor" to the original ad-blocker on Firefox, until the author and I had a difference of opinions on what are called "regular expressions." I saw them as indispensable, he thought they "were too hard & cumbersome for the average person," so when he dumbed down the extension I decided not only to write my OWN "extension;" I would devise a way where the ads were blocked without an extension at all. I succeeded.


I was going to do a "Part 1, Part 2" on this blog and address these files separately, but I think since they really go together we might as well get all the tedium out of the way in one sitting. In for a penny, in for a pound, so crank up the French Press kiddies, and let's have some FUN :) God I'm a geek, and a proud one.

Some background: I was one of many DAILY branch-build Firefox beta testers since version 0.80, and remember "Public Release 1.0," or "1.0PR." To quote Pacino in "Scent of a Woman," ... "I've been AROUND, ya know?!" Firefox has come a long way, somewhat bloated to the chagrin of many, but it still remains the finest, safest browser available today. I say this after installing Google Chrome for roughly 4 months and vigorously testing and "A-B" comparing it with Firefox. Although I was impressed with its speed "most of the time," its cookie management and refusal to KEEP selected cookies while dumping the rest every time I closed the browser led me to uninstall it and return "full time" to Firefox. I also played around with Opera, and my opinion there was the same as it was 5 years ago ... "Meh." I'm keeping it for a spare in case Firefox got hosed up for some reason. But Firefox's "Profile Folder" and chrome folder, which allow for a LOT of personal customization, just can't be beat. Additionally, I'm a Linux user and therefore don't have the DREADFUL Internet Explorer to even consider ... and the Linux browswer Konqueror leaves a lot to be desired as well, frankly. So Firefox it is. I swear by my creation #FiltersetP, and I'm "online" A LOT. I use only this, along with a HOSTS file, which works great in Windows OR the Ubuntu Linux I have preferred since January 2011.




 
Part 1:

FiltersetP And How To Use It:

To block ads you can do one of the following:
  • Install an extension which expands upon installation to 500K or better and slows the browser down (BOO HISS), or 
  • Install the Firefox extension STYLISH  by Jason Barnabe, and incorporate my "FiltersetP Style" therefore making Stylish an adblocker AS WELL AS performing other cool functions & tweaks. #FiltersetP is the 4th most downloaded script in FIREFOX HISTORY, and enjoyed a 4.99 out 5 star rating when the had a "rating system."  The "FiltersetP Style" being found here: Filterset P on UserStyles Dot Org .. or 
  • You can do what I did since the beginning and simply put FiltersetP in your usercontent file and not need an extension at ALL, Stylish, adblocker-type, or otherwise.
If you've ruled out an extension, and I hope you have, then you're left with the remaining 2 above. Jason Barnabe's extension "Stylish" is excellent and allows for ALL SORTS of cool little tweaks ... but again you're talking about installing an extension which could cause slowness. Mozilla don't tell you that but it's common sense; the more you load stuff up on there, the more has to "go on" during your surfing. Personally I have it in my usercontent.css file, which is located within "chrome" folder in your user profile folder. Don't panic and run out of the house screaming. Next section tells you where to "get to that." MAKE A COPY of your "empty" usercontent-example.css, put it on external media such as a flash drive or CD (anything besides just the hard drive you're working on) ... and then simply drag mine in. In older Firefox versions, there was already a usercontent-example.css file in your chrome folder. IN NEWEST VERSIONS, there is not ... so you'll have to create a "chrome" folder in your profile, and simply save my filterset as usercontent.css.

Your Firefox Profile folder location: Experienced Firefox users (and geeks like me) already have a shortcut to their profile folder. You can google its location & how to find it, but a simple way is to open Firefox, go to "HELP" > "Troubleshooting," and in first section of "Application Basics" you'll see "Profile Director" and "open containing folder." Click that open, open the chrome folder in older versions or create one; that's where "usercontent.css" goes. You're done!

CLOSE FIREFOX and re-open and you're good to go :-)




READY? Ohhhhtayyyy!!! To copy my FiltersetP usercontent.css, GO HERE and copy all the text (drag mouse over all of it and copy, or select "EDIT" on top, "Select All" and then Edit > Copy). If you like keyboard shortcuts use "CONTROL A" to select all, and "CONTROL C" to copy. "CONTROL V" pastes.
 
I've "erred on the side of safety" to make sure none of your content is disturbed. Just this morning I found a false positive; in my Pinterest emails I was missing the links to pictures people had commented on. I found the culprit, and that element was removed from FiltersetP. I don't see ads and I don't have problems. NOW .. if YOU do ... here's what to do: Close the browser, and open up usercontent in Notepad or text editor. I'm blessed in Linux with having "gEdit," which puts CSS, HTML and other languages in different colors ... I believe Wordpad does that in Windows but not Notepad. For this lesson it doesn't really matter. By placing /* at the start of a line and */ at the close of it, you perform what's called "Commenting out," meaning that portion is insulated and won't work. That's how you isolate portions for testing. Comment out half of FiltersetP, then the other half, and start narrowing things down. If the bottom half causes a problem, split that in 1/2 again ... and check. You'll quickly narrow down the culprit ... and remove it. Hit "SAVE" (don't save it as a text file, you'll want it saved as .css) ~ Simple. However, you should NOT have any sites where important content is hidden; I've taken hundreds of measures (and 100s of tests) to ensure this attacks ads only.




Part 2:

"HOSTS" ~ The Second Tool I Use In Conjunction With FiltersetP:

GOD BLESS THE HOSTS FILE. 


"What the HELL is that, Paul?!?!" ... Most people don't know they have one, but it's the greatest thing since sliced bread. While FiltersetP hides ad elements from view and therefore speeds up page loading slightly ... the HOSTS file is a way of telling the computer "DO NOT let abc.adservice even ENTER my computer at all!" It is a way to prevent spying web bugs, malware, advertisements, popups, and TRACKING right at the source ... the "entrance" to your computer. Think of it as a "text file firewall." You might Google the location of this also or enter "drivers" in search if you have Vista or later ... as Windows locations may vary slightly.

Windows: It's USUALLY in: C:\windows\system32\drivers\etc\hosts

Vista & Win7:
C:\windows\system32\drivers\etc\  (OR)
%systemroot%\system32\drivers\etc\

For the older Windows 95/98/Me:  C:\windows\hosts
Windows NT/2000/XP Pro:  C:\winnt\system32\drivers\etc\hosts
Windows XP Home C:\windows\system32\drivers\etc\hosts

And in Linux, much easier: /etc/hosts

With Macintosh OS X, the procedure is similar to Linux above. The hosts file can be found in: /etc/hosts

You will as always (Boy, I bet you're sick of me telling you lot to make BACKUPS, but I'm going to pound that habit into you so help me God!) .. want to make a copy of it. Store that, together with me boys and girls .. in Documents somewhere AND on external media like a flash drive, AND/OR on a CD or external drive. I like backups of backups. I have 5. Stop laughing. If my laptop bursts into flames, I swallow the jump drive (I beg your pardon) and lightning hits my external .... Ahhh, good old CD/DVD is right there. It's my nature. Call me RainMan but I've never lost data :-)

OK, so you've spent 3 days now making backups ... here's the easy part:

  1. Download my HOSTS file. 
  2. Save it to somewhere you can remember.
  3. Simply drag it into your HOSTS file location, and select "Yes, by God Almighty, I do want to replace with Paul's awesome kick-ass version." You're done.



One extra little bit of geekiness on the Hosts File: the computer's home "address" is 127.0.0.1 ~ and so most Hosts Files have that address for all the banned sites. However, debate raged some years ago whether 0.0.0.0. was FASTER because it sent the "spammy types" absolutely NOWHERE. I subscribe to this theory, so all my prefixes are zeroes ... 0.0.0.0.

OK, now before I give you the link, the instructions:

Windows Users: using instructions above, copy what's on the linked file, and paste it onto your HOSTS File. You can get RID of the information already there, it's informational only ... so first line on there after pasting will be 127.0.0.1 Local Host. THEN SAVE. By SAVE I mean just "save," as is, no file extension! It's not .txt or anything else, it's just plain old "HOSTS" as is. 

Linux Users: In Linux, your HOSTS file (along with every other file/folder!) is protected. You can't just willy-nilly edit something and especially the HOSTS file. Open a terminal and type

sudo nautilus

it will ask for your password. Enter that, press enter, and when Nautilus File Manager pops up, navigate to your HOSTS File and open it. I use gEdit text editor (vastly superior to Windows Notepad/Wordpad) so if it asks what application you want, tell it gEdit. It's probably the default anyway.

!IMPORTANT!: DO NOT DELETE any information already there! It contains information to your particular computer, in my case Toshiba laptop. Index to next line (clean line, left margin) and PASTE the information in the linked file. Hit "SAVE" and you're done.

Then, using instructions above, copy what's on the linked file and PASTE BELOW THE TEXT PRESENTLY IN YOUR HOSTS FILE. Do not delete any information already there (just a few lines). Index down to line directly below what's there and PASTE. Then "Save." 

Apple Users:  I don't use a MAC or Apply anything, and don't want to. That's not to be snide; I'm simply unfamiliar with the Apple HOSTS File. I can't be sure what "pretext" is on that one. I imagine you'd do the same as the Linux users and APPEND the one you have with my list. However, if you're not thoroughly familiar with the Apple HOSTS file, don't alter it, or ask an Apple-Buddy, or Google it.


OK! Now we've covered the bases according to your operating system ...

Go HERE for my HOSTS FILE and use instructions above to copy the contents.

Closing Comments:
If either of these files ~ FiltersetP or HOSTS file ~ help you, I would love TWO things:

1] to hear your comments as it will encourage others to do it, especially if they don't have a lot of technical knowlege. Again, I use both of these with remarkable results, improved page loading AND security ... and I'm happy and excited to share this information with you all.


2] FiltersetP was 2 years in the making and 6 years of field testing which continues to this day. My HOSTS file is lethally small ... 7K versus 300-900K ... and also involved a lot of intensive work and testing on my part. SO ... to help further support their development, plus these tech blogs, feel free to use the button here on the FiltersetP on UserStyles / Org Page   to DONATE. Thank you and rock on, Ad-less, faster and more secure. God Bless :-) OXO


1 comment:

  1. Paul, I appreciate your research, expertise and your taking time to write the blog and share. Most of this is over my head as I am a lazy techie. I am going to reread this and save for future reference for myself and others. Thanks!

    ReplyDelete

I always like to hear positive, clean comments; if you hate what I have to say, feel free to just move on.