src/document/DocumentCommandHandlers.js
function browserReload(href) {
        if (_isReloading) {
            return;
        }

        _isReloading = true;

        return CommandManager.execute(Commands.FILE_CLOSE_ALL, { promptOnly: true }).done(function () {
            // Give everyone a chance to save their state - but don't let any problems block
            // us from quitting
            try {
                ProjectManager.trigger("beforeAppClose");
            } catch (ex) {
                console.error(ex);
            }

            // Disable the cache to make reloads work
            _disableCache().always(function () {
                // Remove all menus to assure every part of Brackets is reloaded
                _.forEach(Menus.getAllMenus(), function (value, key) {
                    Menus.removeMenu(key);
                });

                // If there's a fragment in both URLs, setting location.href won't actually reload
                var fragment = href.indexOf("#");
                if (fragment !== -1) {
                    href = href.substr(0, fragment);
                }

                // Defer for a more successful reload - issue #11539
                setTimeout(function () {
                    window.location.href = href;
                }, 1000);
            });
        }).fail(function () {
            _isReloading = false;
        });
    }
function browserReload(href) {
        if (_isReloading) {
            return;
        }

        _isReloading = true;

        return CommandManager.execute(Commands.FILE_CLOSE_ALL, { promptOnly: true }).done(function () {
            // Give everyone a chance to save their state - but don't let any problems block
            // us from quitting
            try {
                ProjectManager.trigger("beforeAppClose");
            } catch (ex) {
                console.error(ex);
            }

            // Disable the cache to make reloads work
            _disableCache().always(function () {
                // Remove all menus to assure every part of Brackets is reloaded
                _.forEach(Menus.getAllMenus(), function (value, key) {
                    Menus.removeMenu(key);
                });

                // If there's a fragment in both URLs, setting location.href won't actually reload
                var fragment = href.indexOf("#");
                if (fragment !== -1) {
                    href = href.substr(0, fragment);
                }

                // Defer for a more successful reload - issue #11539
                setTimeout(function () {
                    window.location.href = href;
                }, 1000);
            });
        }).fail(function () {
            _isReloading = false;
        });
    }
function browserReload ( href ) { if ( _isReloading ) { return ; } _isReloading = true ; return CommandManager . execute ( Commands . FILE_CLOSE_ALL , { promptOnly : true } ) . done ( function ( ) { // Give everyone a chance to save their state - but don't let any problems block // us from quitting try { ProjectManager . trigger ( "beforeAppClose" ) ; } catch ( ex ) { console . error ( ex ) ; } // Disable the cache to make reloads work _disableCache ( ) . always ( function ( ) { // Remove all menus to assure every part of Brackets is reloaded _ . forEach ( Menus . getAllMenus ( ) , function ( value , key ) { Menus . removeMenu ( key ) ; } ) ; // If there's a fragment in both URLs, setting location.href won't actually reload var fragment = href . indexOf ( "#" ) ; if ( fragment !== - 1 ) { href = href . substr ( 0 , fragment ) ; } // Defer for a more successful reload - issue #11539 setTimeout ( function ( ) { window . location . href = href ; } , 1000 ) ; } ) ; } ) . fail ( function ( ) { _isReloading = false ; } ) ; }
Does a full reload of the browser window
@param {string} href The url to reload into the window
Does a full reload of the browser window