News for hackers. Stuff that matters.

Ask HN: Do you care about downtime of the 3rd party JavaScripts on your website?

Many of us are being asked to embed 3rd party javascripts such as web analytics, ads, widgets etc. Some of us are using tag management solutions to simplify the deployment and organization of all those tags. Average webpage has over 100 objects to load (like js, images etc) and many of those are external resources that are out of our control. Yet tag management does not usually help with script downtime or webpage performance degradation because of synchronous scripts usage.

What do you do to minimize the possible issues of those 3rd party scripts ? (e.g. downtime, performance degradation or malicious behavior)

P.S we have built MVP that tracks performance/downtime of external scripts. We have been monitoring most popular scripts used by many sites and I can say that downtime does occur on popular scripts almost on daily basis (we are monitoring so far top 500 javascripts used by Alexa 1 million websites). If you are interested to monitor your javascripts - check us out here - http://www.scriptmonitoring.com

( 10 comments | 2 points | on HN )
Re:Ask HN: Do you care about downtime of the 3rd party JavaS... by barryhand on Tuesday July 21, 2015 @12:14PM (#9923303)
You know what does slow down websites? 5MB background images like this one - http://scriptmonitoring.com/images/headerbg.jpg
Re:Ask HN: Do you care about downtime of the 3rd party JavaS... by captn3m0 on Saturday July 18, 2015 @11:55AM (#9907837)
Yes, I've been personally facing issues because the CDN server of a particular JS app that we integrate is slow.

We can't host it ourselves because that way we miss out on updates. However, its non-critical to our app, so I'm thinking of marking it as async so it doesn't hamper the page load times.

Re:Ask HN: Do you care about downtime of the 3rd party JavaS... by greenyoda on Saturday July 18, 2015 @01:16PM (#9908134)
"We can't host it ourselves because that way we miss out on updates."

Couldn't you just have a cron job that grabs the latest copy from the CDN every night and caches it on your own server?

Re:Ask HN: Do you care about downtime of the 3rd party JavaS... by captn3m0 on Sunday July 19, 2015 @03:53AM (#9910401)
That sounds like an interesting idea. Maybe I'll try this.
Re:Ask HN: Do you care about downtime of the 3rd party JavaS... by forcer on Saturday July 18, 2015 @12:00PM (#9907861)
do you think your script would work if you just changed it from sync to async? I know some services do not provide async versions and converting from sync to async manually is not recommended.
Re:Ask HN: Do you care about downtime of the 3rd party JavaS... by captn3m0 on Sunday July 19, 2015 @03:55AM (#9910404)
I was thinking of the async attribute in HTML5 for script tags[0]. I was hoping that the browser would just mark the script as non-blocking and continue the render, which works fine for us.

[0]: https://developer.mozilla.org/en/docs/Web/HTML/Element/scrip...

Re:Ask HN: Do you care about downtime of the 3rd party JavaS... by zhte415 on Saturday July 18, 2015 @11:50PM (#9909991)
> We can't host it ourselves because that way we miss out on updates.

Are you happy getting pushed updates that you've not checked and verified?

Re:Ask HN: Do you care about downtime of the 3rd party JavaS... by captn3m0 on Sunday July 19, 2015 @03:53AM (#9910400)
We are getting a blob of minified JS anyway.
Re:Ask HN: Do you care about downtime of the 3rd party JavaS... by zhte415 on Sunday July 19, 2015 @06:28AM (#9910720)
So are you happy getting a blob of minified JS you have no control of?
Re:Ask HN: Do you care about downtime of the 3rd party JavaS... by captn3m0 on Sunday July 19, 2015 @07:14AM (#9910811)
At some point, you have to trust your dependencies. I cannot audit every dependency of our system.