This Is Why Your Website Is Slow
technologyreview.com
technologyreview.com
Unfortunately, some of the better-paying CPM ad networks have the slowest javascript ads the world has ever seen.
We're basically trying to see if removing ads improves our page load speed and therefore our SERP enough to somewhat offset the lost income.
My suggestion was about plotting for content/advertiser networks the lag for their Javascript against the income the site derives from the network. This is quite likely to be somewhat sensitive information, at least to a degree, so sharing it would be generous.
http://perspectives.mvdirona.com/2009/10/31/TheCostOfLatency...
I coded one two (three?) years ago for a contract, and it worked like a charm. Used it for tracking pixels, Google tracking, and a bunch of other stuff.
Surprised this kind of snippet isn't readily available on the intertubes.
Let me know if you'd like a few of my more devious snippets to add to your project, like overloading document.write (surprising how many of those damned advertising scripts still use document.write instead of div injection! :-\).
I was really (really) hesitant to begin blocking adverts. I believe in paying for what I use. What finally pushed me over the edge was "good" sites unknowingly distributing malware via adverts.
Luckily there is an option to turn off JavaScript but there needs to be more control like whitelisting.
https://github.com/chalst/pollockhostsfork
I'll see how good I am about updating this: there seem to be 2-4 changes most weeks.
Postscript - I've emailed Dan Pollock to see if he thinks this git repo is worthwhile. There is already a version of the file on Github at https://gist.github.com/399642, but it is not updated and is a year and a half old.
So could I get a little more detail here about why git is important? Are you making a init script to pull the file directly into /etc/hosts at boot (or at an interval)?
The point is that several people can maintain their own branches of /etc/hosts and use git to keep them up to date and propagate their additions.
I'd just clobber /etc/hosts from the repo file with cp -f, whenever the repo is changed, no need for any cron/init automation.
Just out of curiosity, how does one go about figuring out what sites to block and keeping this up to date and relevant? That would seem like a lot of effort?
Maybe due to javascript trying to call things that don't exist? Not sure. Just be aware that hosts blocking can cause odd page results on occasion, because of content fetch failures (as apposed to noscript/adblock which often stop the request from even happening).
I'm sure that this is choir-preaching at its finest, but using the non-async AddThis plugin should be avoided at all costs.
I've seen one AddThis call replace half a dozen individual Javascript/IFrames for all the different social networks. Seems like that would generally be an improvement.
Despite the resources of Google, that server is waay overloaded. I was staring at the browser status line waiting for that server to cough up, so the page could render correctly (or at all).
Supposedly, there are ways to embed doubleclick ads that do not slow down page rendering. However, most of the sites I visit haven't mastered the technique.
Also, you can see that Google is running JS and loading flash by looking at the Image Preview that appears when you search.
[1] "This page shows you performance statistics of your site. You can use this information to improve the speed of your site and create a faster experience for your users" http://i.imgur.com/Jfz8O.png
Page load time is the total time from the moment the user clicks on a link to your page until the time the entire page is loaded and displayed in a browser. It is collected directly from users who have installed the Google Toolbar and have enabled the optional PageRank feature.
http://www.google.com/support/webmasters/bin/answer.py?answe...
hides