I've read over the beforeload
documentation from Apple, but I'm still a bit uncertain about how beforeload
cancels a load, from a network perspective. Apple's documentation says:
Safari 5.0 and later (and other WebKit-based browsers) generates a "beforeload" event before loading each subresource belonging to a webpage.
There's nothing in the sparse documentation here that suggests to me that a beforeload
block must prevent a HTTP fetch of the resource. What does the operation of "loading" a Web resource entail (e.g., is there a formal definition of load
ing in some W3C spec)? In Webkit's current implementation, does canceling a load with beforeload
stop the browser from sending a HTTP request, or does it merely stop the resource from being rendered and firing a load
event?
I'm primarily instead in these question to assess beforeload
's usefulness to block tracking images. I know there are other ways to do this (e.g., Chrome's webRequest
API), but I want to know if beforeonload
is also suitable.