This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 24371 - Instead of having ping attribute, it would be more beneficiall if there was a JavaSctipt API that coould do ping more reliably. Today most browsers will discard pending AJAX calls and navigate to the [...]
Summary: Instead of having ping attribute, it would be more beneficiall if there was a...
Status: RESOLVED WONTFIX
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-23 04:01 UTC by contributor
Modified: 2014-01-24 23:24 UTC (History)
4 users (show)

See Also:


Attachments

Description contributor 2014-01-23 04:01:09 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html
Multipage: http://www.whatwg.org/C#ping
Complete: http://www.whatwg.org/c#ping
Referrer: 

Comment:
Instead of having ping attribute, it would be more beneficiall if there was a
JavaSctipt API that coould do ping more reliably. Today most browsers will
discard pending AJAX calls and navigate to the new documment immediatelly. It
would be nice if we can tell browser to make sure specific request is sent, we
don't need to supply call back for such request and thus page can be safely
discarded. The only thing left in memory would be pending ping requests - the
same thing as would be for requests made from the ping attribute.

Posted from: 2001:470:85cd:0:862b:2bff:feaa:4e86
User agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0
Comment 1 Libor Valenta 2014-01-23 04:19:49 UTC
Most of the tracking and logging on the web do not require response, letting browser know that you don't expect anything back can be very helpful to make it work efficiently and reliably.

If ping attribute is implemented, I guess the Script can just modify the link attribute and let browser do the default action. Will that be enough though? Will for example form have ping attribute as well? How about script changing window.location? Will there be any mechanism to fire the ping request(s) from onbeforeunload?
Comment 3 Libor Valenta 2014-01-24 17:53:09 UTC
(In reply to Simon Pieters from comment #2)
> https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/Beacon/Overview.html
Thank you Simon for the link. That's the API i was hoping to see. The @ping and sendBeacon are complementary and I hope they will be developed in harmony.

Is there reason why ping is not proposed to be available on the form element?
Comment 4 Ian 'Hixie' Hickson 2014-01-24 23:24:13 UTC
ping="" isn't on <form> because the main use cases were for straight links (e.g. ads), and we didn't want to add lesser used features until the first one was implemented. So we started with <a ping> and waited. Since it hasn't been widely implemented yet, we haven't added anything yet.

The Beacon API may make this moot.

I'm marking this WONTFIX for now, given the above.