News for hackers. Stuff that matters.
Re:Google Releases mod_pagespeed for Apache by jellicle on Wednesday November 03, 2010 @12:41PM (#1865378)
That's pretty cool, though the biggest slowdown for most sites are all of the third-party scripts being loaded from remote servers. If people really realized how much page speed matters in usability, they would be loathe to add in all the scripts from facebook and digg and google and 12 different analytics services.
Re:Google Releases mod_pagespeed for Apache by al_james on Wednesday November 03, 2010 @01:23PM (#1865570)
Ad networks are a particular culprit. For many (banner) ad networks, HTTP requests get bounced around so many servers that it can really slow things down.
Re:Google Releases mod_pagespeed for Apache by SanjayUttam on Wednesday November 03, 2010 @02:59PM (#1865997)
Might be obvious, but this is why you should use some asynchronous code to load your ads.
Re:Google Releases mod_pagespeed for Apache by mise on Thursday November 04, 2010 @11:10AM (#1869196)
If someone knows how to do with with OpenX, let me know. I've read using iFrames is a solution, but don't know the disadvantages to this.
Re:Google Releases mod_pagespeed for Apache by tropin on Wednesday November 03, 2010 @03:13PM (#1866062)
Could you please give us some links or info on loading the ads asynchronously?

Is it compatible with Adsense policy?

Re:Google Releases mod_pagespeed for Apache by SanjayUttam on Wednesday November 03, 2010 @03:29PM (#1866118)
Here are some links. I don't have a rock solid answer regarding Google's TOS for this, my apologies.

Async Adsense: http://webmasters.stackexchange.com/questions/2506/is-it-pos...

Async Analytics: http://www.ditii.com/2009/12/01/google-analytics-asynchronou...

Re:Google Releases mod_pagespeed for Apache by tropin on Wednesday November 03, 2010 @03:37PM (#1866157)
From the first link: "this practice might not be welcome by Google".

I don't know what's the second link for, as analytics are asynchronous per se?

EDIT: By the date on the second url, very probably is a hack for an older version of Analytics.

EDIT 2: First link is an unaccepted answer on an stackoverflow-like site on the topic for using an against the rules of Google hack. And Google doesn't need much help for closing your account and your money.

Re:Google Releases mod_pagespeed for Apache by SanjayUttam on Wednesday November 03, 2010 @03:56PM (#1866229)
Re: Analytics; I'm not sure if the default code google gives you for analytics is async _now_ but based on this http://code.google.com/apis/analytics/docs/tracking/asyncTra... it certainly seems like it, at least at one point, it was not. Again, that may have changed.

Here is another link for async adsense with code included. The author has also posted his e-mail conversation with a rep. from the Google Adsense team. There is nothing fancy going on here, just iframes, really.

http://geoland.org/2007/01/adsense-in-iframe/

You could just reach out to adsense yourself and report back what you find regarding violation of the Google Adsense TOS.

Re:Google Releases mod_pagespeed for Apache by cheald on Thursday November 04, 2010 @03:43AM (#1868076)
Google Ad Manager -really- does not like you doing anything asynchronously, unfortunately.
Re:Google Releases mod_pagespeed for Apache by al_james on Thursday November 04, 2010 @06:02AM (#1868301)
Yeah, its because many of the ad networks that you may load into it simply cannot work asynchronously (document.write). So they have to enforce synchronous loading on the ad manger code.
Re:Google Releases mod_pagespeed for Apache by al_james on Wednesday November 03, 2010 @03:58PM (#1866240)
Not always possible with all banner networks I am afraid!
Re:Google Releases mod_pagespeed for Apache by pjscott on Wednesday November 03, 2010 @04:44PM (#1866418)
Those banner networks deserve to lose customers to the banner networks that do support asynchronous loading. Does anybody have a list of which banner networks allow it and which don't?
Re:Google Releases mod_pagespeed for Apache by wanderr on Wednesday November 03, 2010 @04:46PM (#1866428)
It is if you stick their ads in an iframe, ala Grooveshark.
Re:Google Releases mod_pagespeed for Apache by al_james on Wednesday November 03, 2010 @07:06PM (#1866894)
Not if they are contextual and demand the host script to be in the top level document. (and this is against the terms of use of many advertising services)
Re:Google Releases mod_pagespeed for Apache by joshfraser on Wednesday November 03, 2010 @09:47PM (#1867265)
you lose ad revenue if you do that. the longer it takes the ad to show up on the page, the less likely people are to click on it.
Re:Google Releases mod_pagespeed for Apache by yellowbkpk on Thursday November 04, 2010 @12:26AM (#1867687)
The longer it takes me to load your page, the less likely I will ever see it (because I back out to my previous page) or will ever come back to it (because of the bad experience).
Re:Google Releases mod_pagespeed for Apache by tropin on Wednesday November 03, 2010 @02:35PM (#1865883)
My adsense scripts almost always freeze my webs waiting for them to load.

Do you fellow HNers know any way to speed up them or at least load them in the background?

Re:Google Releases mod_pagespeed for Apache by asolove on Wednesday November 03, 2010 @02:45PM (#1865935)
Put script tags at the end of the body, not in the header. If you still have a problem, dynamically add the script tags after the page has already loaded and displayed.
Re:Google Releases mod_pagespeed for Apache by tropin on Wednesday November 03, 2010 @03:12PM (#1866057)
???

Could you share any sample of adsense with scripts in the header? Also, do you know any way to load dynamically the scripts?

Google seems to be full of people trying to do it to no avail.

Re:Google Releases mod_pagespeed for Apache by bentlegen on Wednesday November 03, 2010 @04:29PM (#1866359)
Re:Google Releases mod_pagespeed for Apache by lamnk on Wednesday November 03, 2010 @08:15PM (#1867030)
Did you read the parent comment ? He asked about adsense script, not analytics tracking code.
Re:Google Releases mod_pagespeed for Apache by metachris on Wednesday November 03, 2010 @02:43PM (#1865923)
You could inject the analytic script after the page has loaded instead of having it part of it.
Re:Google Releases mod_pagespeed for Apache by tropin on Wednesday November 03, 2010 @03:10PM (#1866044)
I'm talking about ads, not analytics.
Re:Google Releases mod_pagespeed for Apache by aiurtourist on Wednesday November 03, 2010 @03:53PM (#1866222)
It's been a while, but I think you can choose between IFRAME and DOM-injection methods. Researching that might get you started.
Re:Google Releases mod_pagespeed for Apache by user24 on Wednesday November 03, 2010 @01:09PM (#1865500)
addthis is a particularly guilty culprit. pageSpeed is always giving me hassle about their CSS. grumpywebmaster. You listening addthis?
Re:Google Releases mod_pagespeed for Apache by catshirt on Wednesday November 03, 2010 @01:40PM (#1865640)
You're right, but seems irrelevant. mod_pagespeed likely has a very different audience.