CoreFiles by mySites.guru
keepalive-uncompressed.js39 lines, 950 bytes, from Joomla_3.7.0-alpha1-Alpha-Full_Package.zip
Raw History Compare with 3.6.0-alpha
md5
0de97286fc2c6d0fdb7c0e2d1d4ae4c1
sha1
5b04e8727dca3da8c075093d57a83afa2a89c532
sha256
c02a7eae5939849bfd01d1ecf2a350919e374d54159efea85a977ef2664ed689
/**
 * @copyright   Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

/**
 * Keepalive javascript behavior
 *
 * Used for keeping the session alive
 *
 * @package  Joomla
 * @since    3.7.0
 */
!(function(){
	'use strict';

	document.addEventListener('DOMContentLoaded', function() {

		var keepaliveOptions  = Joomla.getOptions('system.keepalive'),
		    keepaliveUri      = keepaliveOptions.uri ? keepaliveOptions.uri.replace(/&/g, '&') : window.location.pathname,
		    keepaliveInterval = keepaliveOptions.interval ? keepaliveOptions.interval : 45 * 1000;

		window.setInterval(function() {
			Joomla.request({
				url:    keepaliveUri,
				onSuccess: function(response, xhr)
				{
					// Do nothing
				},
				onError: function(xhr)
				{
					// Do nothing
				}
			});
		}, keepaliveInterval);

	});

})(window, document, Joomla);

No other release has this exact content. See every version of this file.