Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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?



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.


???

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.



Did you read the parent comment ? He asked about adsense script, not analytics tracking code.


You could inject the analytic script after the page has loaded instead of having it part of it.


I'm talking about ads, not analytics.


It's been a while, but I think you can choose between IFRAME and DOM-injection methods. Researching that might get you started.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: