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

If you work for a media org - than you KNOW that on the non-amp pages the synchronous java script from a hundred tracking / ad platforms (why can't these sites just use ONE tracking library) CRUSH the page load times.

Despite your (false) claim that google support sync javascript ad libraries "just as they do in their regular sites" this is 100% false.

The amp javascript components have DOM interaction restrictions, file size restrictions, response restrictions, can't run sync etc.

for amp-ad

"No ad network-provided JavaScript is allowed to run inside the AMP document. Instead, the AMP runtime loads an iframe from a different origin (via iframe sandbox) as the AMP document and executes the ad network’s JS inside that iframe sandbox."

If you can't understand why some of these steps result in both a faster site and one that is more secure I can't help you, but please stop with the misinformation here.



> "No ad network-provided JavaScript is allowed to run inside the AMP document. Instead, the AMP runtime loads an iframe from a different origin (via iframe sandbox) as the AMP document and executes the ad network’s JS inside that iframe sandbox."

GOOGLE CONTROLS THE AD ECOSYSTEM. If they think that's a good idea, do it on regular webpages. Literally, AMP is only faster because Google provided ads are so slow that any more sane architecture can easily run circles around them.

How Google could speed up the web 5000%:

"Starting next month, all ads must be a collection of static assets with no JavaScript outside of this toolbox. We will host the ads and ensure no other JavaScript is executed."

Done.


> Despite your (false) claim that google support sync javascript ad libraries "just as they do in their regular sites" this is 100% false.

OP didn’t claim this.


> they will look how to load it with ads and tracking, which very conveniently is supported on amp, just as they do in their regular sites.

Yes OP did.


He put words in OPs mouth about sync loaded JS.


Take "sync" out of the mouth-inserted words and it's an exact representation of OP's claim: that AMP pages will gravitate toward being just as JS-laden as non-AMP pages.

Whether or not that claim is true is beyond both my expertise and my interest.


No, this doesn’t say anything about sync vs async.


The parent / op literally says they will load AMP with ads and trackers "just as they do in their regular sites."

So we are very clear, regular HTML websites allow sync javascript and cross site / full dom access etc by trackers and ad platforms. Sync is preferred for a few reasons by ad providers. Lots of regular sites have sync javascript.

On AMP, total javascript size is limited, dom interactions are limited (ie, you can repaint the screen repeatedly with the flyover crap etc) and sync is prohibited and the script generally runs in a sandboxed iframe with a separate web worker.

So I'm not putting words in anyone's mouth, I quotes them exactly, and am pointing out that despite their false claim that you can run same things in AMP you do on regular site - you cannot.

People claiming that AMP is only faster because of preload, that publishers can abuse the user as much as they do with full HTML, that javascript works just as it does on their regular site are lying.

Is AMP perfect? No - folks will always be able to abuse things, but it cuts down on a bunch of common and egregious abuses.

I wonder if part of the issue is some folks here browse with ad-block or other extensions and so don't really experience the web as publishers intend it - because the differences between AMP and non AMP sites is glaring (ignoring the preload question).


Sorry, none of this matters. You are still putting words in OPs mouth. You should apologize for doing that and simultaneously saying they made a false claim.


amp-ads moves those ads/trackers in iframes, but that doesn't reduce the code size, right? google is also injecting code in your site , so you can't be sure that it's secure / private, right?

And if i promise to make all ads async and iframe, will google promise to rank my site higher? If not , they are discriminating in favor of their own walled garden system without an objective ruse.


really? adsense forbids use of iframes afaik



they offer replacements as amp-ads. i dont know how they work




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: