Skip to content

Logic for application that want use beforeunload event for unsubscribing

jfarcand edited this page Aug 30, 2012 · 1 revision

By default, Atmosphere is using the unload event to unsubscribe and close its associated connection. If you want to do the same with beforeUnload, just do:

Logic for those who want use beforeunload event
$(window).on("beforeunload", function() {
    $(window).trigger("unload.atmosphere");
});

Step by Step Tutorials

Concepts & Architecture

15 Minutes Tutorial

Advanced Topics

API

Known WebServer Issues

References

External Documentations

githalytics.com alpha

Clone this wiki locally