23 responses

  1. jl
    February 26, 2017

    hello, go to the library savedstate as mentioned above open the folder and delete the .plist file. it does the work.

    Reply

  2. Leonard
    May 15, 2015

    Could you please update this for Yosemite (10.10.3)?

    I would love to prevent the previous windows on Preview ONLY from reopening.

    Thanks!

    Reply

  3. andy
    March 20, 2014

    turning it off for preview, at least, does not work in Mavericks.

    Reply

  4. Festus
    December 1, 2013

    Newbies, if you did not understand this and it didn’t work for you (that’s me) there is an easier albeit temporary fix. Go to the ~/Library/Saved Application State/ folder and then drag the entire offending subfolder into the Trash.

    I was having trouble with Powerpoint. So for me that meant dragging the subfolder called com.microsoft.Powerpoint.savedState
    into the Trash.

    Then open the offending application. In my case, Powerpoint. Presto, done.

    Reply

    • Manasi
      July 17, 2014

      Thanks! That helped.

      Reply

  5. April
    March 19, 2012

    THANK YOU, this has been the bane of my existence in Lion; the only application in which it’s been extremely useful is TextEdit, but Preview and Safari have been awful.

    Reply

  6. Lior
    January 18, 2012

    Hey guys, this doesn’t work for me…
    My finder keeps closing all my windows after restart, even though I have open windows after restart…
    I really miss SnowLeopard. I want NONE of the apps to resume and Finder to keep all my windows open after restart. Anyone?

    Reply

  7. Matthew Perkins
    January 14, 2012

    this is handy if you want to turn off resume for all apps, just run in terminal:

    for i in $(ls ~/Library/Saved\ Application\ State/); do name=$(echo $i | sed ‘s/.savedState//’); defaults write $name NSQuitAlwaysKeepsWindows -bool false; done

    Reply

  8. TjSnake
    January 8, 2012

    I tried this. I tried RestoreMeNot and both didn’t work. Can anyone help? I don’t want to disable whole function I just want to block some apps. But neither Terminal commands and RestoreMeNot work. It does on another computer.

    Reply

    • Carroll
      February 13, 2012

      The latest version of TinkerTool (4.7) has added the resume option for individual apps.

      Reply

  9. Frederic
    November 5, 2011

    A few complements about how to disable the resume feature on a app basis:
    – if you execute the “default write …” command when the app is not running, there is chance that the next time you start it the last open window(s) will be resumed again, but if you close and reopen the app they will not appear (I had the problem with Preview.app)
    – if you execute the command while the application is running, you will not have this problem (again, it was the behaviour I got with the Preview.app)

    – when modifying the resume behaviour for an application stored in /Applications, instead of using a string like “com.apple.Preview” to specify the domain you want to modify, you can use the “-app” option with the name of the application as found in /Applications (without the .app extension; compare: com.apple.QuickTimePlayerX vs -app “QuickTime Player” — (single or double) quotes are mandatory when the app name includes some spaces, or use backlash instead)

    Reply

  10. Haravikk
    October 15, 2011

    Thanks for posting this tip!

    However, I’ve found an interesting case; TextEdit! It doesn’t save its window state in ~/Library/Saved Application State, so locking that folder won’t stop it. In addition, the following command does nothing:
    defaults write com.apple.TextEdit NSQuitAlwaysKeepsWindows -bool false

    This means that TextEdit has Resume functionality without actually using the normal behaviour for the feature, very annoying! Anyone know how to stop TextEdit without turning Resume off completely?

    Reply

  11. Julie
    September 12, 2011

    I tried this with Microsoft Word and it doesn’t work :/

    Reply

  12. will
    September 2, 2011

    option+command+q rather than just command q disables that app you close from resuming where it was left off..

    just an alternative to terminal for those who don’t fully understand it and how you can permanently damage your system from misuse

    Reply

  13. clasqm
    August 2, 2011

    Have try this right now. Preview is driving me insane reloading a dozen PDFs I’m all done with.

    Reply

  14. Mike
    August 1, 2011

    I prefer locking the folder, makes it easier and then I can lock the state to what I want to reopen.

    Reply

  15. ENTC
    August 1, 2011

    Alternate title: How to avoid embarrassing situations with your web browser in Mac OS X Lion

    Reply

  16. HateResume
    November 30, 2011

    I want this disabled on ALL apps. I just find it extremely annoying, not helpful at all. I’ve gone to System Pref–General and turned it off.

    But this doesn’t turn it off.

    Anyone else have this problem? The general system-wide disable just doesn’t function.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

`;e.insertAdjacentHTML(i,s)}return document.getElementById(t)}_repeatDynamicAds(t){const i=[],n=this._removeRecipeCapExperiment.result&&t.location===d.Recipe?99:this.locationMaxLazySequence.get(t.location),s=t.lazy?O(n,0):0,o=t.max,r=t.lazyMax,a=0===s&&t.lazy?o+r:Math.min(Math.max(s-t.sequence+1,0),o+r),l=Math.max(o,a);for(let n=0;n=o;i.push(e({},t,{sequence:s,lazy:r}))}}return i}_locationEnabled(e){const t=this._clsOptions.enabledLocations.includes(e.location),i=this._clsOptions.disableAds&&this._clsOptions.disableAds.all||document.body.classList.contains("adthrive-disable-all"),n=!document.body.classList.contains("adthrive-disable-content")&&!this._clsOptions.disableAds.reasons.has("content_plugin");return t&&!i&&n}constructor(e,t){this._clsOptions=e,this._adInjectionMap=t,this._recipeCount=0,this._mainContentHeight=0,this._mainContentDiv=null,this._totalAvailableElements=[],this._minDivHeight=250,this._densityDevice=u.Desktop,this._pubLog={onePerViewport:!1,targetDensity:0,targetDensityUnits:0,combinedMax:0},this._densityMax=.99,this._smallerIncrementAttempts=0,this._absoluteMinimumSpacingByDevice=250,this._usedAbsoluteMinimum=!1,this._infPageEndOffset=0,this.locationMaxLazySequence=new Map([[d.Recipe,5]]),this.locationToMinHeight={Below_Post:we,Content:we,Recipe:we,Sidebar:we};const{tablet:i,desktop:n}=this._clsOptions.siteAds.breakpoints;this._device=((e,t)=>{const i=window.innerWidth;return i>=t?"desktop":i>=e?"tablet":"phone"})(i,n),this._config=new ce(e),this._clsOptions.enabledLocations=this._config.enabledLocations,this._clsTargetAdDensitySiteExperiment=this._clsOptions.siteAds.siteExperiments?new be(this._clsOptions):null,this._stickyContainerAdsExperiment=new Ce,this._stickyContainerRecipeExperiment=new Oe,this._removeRecipeCapExperiment=new me}}function Ae(e,t){if(null==e)return{};var i,n,s={},o=Object.keys(e);for(n=0;n=0||(s[i]=e[i]);return s}class Ee{get enabled(){return!0}}class Pe extends Ee{setPotentialPlayersMap(){const e=this._videoConfig.players||[],t=this._filterPlayerMap(),i=e.filter((e=>"stationaryRelated"===e.type&&e.enabled));return t.stationaryRelated=i,this._potentialPlayerMap=t,this._potentialPlayerMap}_filterPlayerMap(){const e=this._videoConfig.players,t={stickyRelated:[],stickyPlaylist:[],stationaryRelated:[]};return e&&e.length?e.filter((e=>{var t;return null==(t=e.devices)?void 0:t.includes(this._device)})).reduce(((e,t)=>(e[t.type]||(C.event(this._component,"constructor","Unknown Video Player Type detected",t.type),e[t.type]=[]),t.enabled&&e[t.type].push(t),e)),t):t}_checkPlayerSelectorOnPage(e){const t=this._potentialPlayerMap[e].map((e=>({player:e,playerElement:this._getPlacementElement(e)})));return t.length?t[0]:{player:null,playerElement:null}}_getOverrideElement(e,t,i){if(e&&t){const n=document.createElement("div");t.insertAdjacentElement(e.position,n),i=n}else{const{player:e,playerElement:t}=this._checkPlayerSelectorOnPage("stickyPlaylist");if(e&&t){const n=document.createElement("div");t.insertAdjacentElement(e.position,n),i=n}}return i}_shouldOverrideElement(e){const t=e.getAttribute("override-embed");return"true"===t||"false"===t?"true"===t:!!this._videoConfig.relatedSettings&&this._videoConfig.relatedSettings.overrideEmbedLocation}_checkPageSelector(e,t,i=[]){if(e&&t&&0===i.length){return!("/"===window.location.pathname)&&C.event("VideoUtils","getPlacementElement",new Error(`PSNF: ${e} does not exist on the page`)),!1}return!0}_getElementSelector(e,t,i){return t&&t.length>i?t[i]:(C.event("VideoUtils","getPlacementElement",new Error(`ESNF: ${e} does not exist on the page`)),null)}_getPlacementElement(e){const{pageSelector:t,elementSelector:i,skip:n}=e,s=L(t),{valid:o,elements:r}=s,a=Ae(s,["valid","elements"]),l=M(i),{valid:c,elements:d}=l,u=Ae(l,["valid","elements"]);if(""!==t&&!o)return C.error("VideoUtils","getPlacementElement",new Error(`${t} is not a valid selector`),a),null;if(!c)return C.error("VideoUtils","getPlacementElement",new Error(`${i} is not a valid selector`),u),null;if(!this._checkPageSelector(t,o,r))return null;return this._getElementSelector(i,d,n)||null}_getEmbeddedPlayerType(e){let t=e.getAttribute("data-player-type");return t&&"default"!==t||(t=this._videoConfig.relatedSettings?this._videoConfig.relatedSettings.defaultPlayerType:"static"),this._stickyRelatedOnPage&&(t="static"),t}_getMediaId(e){const t=e.getAttribute("data-video-id");return!!t&&(this._relatedMediaIds.push(t),t)}_createRelatedPlayer(e,t,i,n){"collapse"===t?this._createCollapsePlayer(e,i):"static"===t&&this._createStaticPlayer(e,i,n)}_createCollapsePlayer(t,i){const{player:n,playerElement:s}=this._checkPlayerSelectorOnPage("stickyRelated"),o=n||this._potentialPlayerMap.stationaryRelated[0];if(o&&o.playerId){this._shouldOverrideElement(i)&&(i=this._getOverrideElement(n,s,i)),i=document.querySelector(`#cls-video-container-${t} > div`)||i,this._createStickyRelatedPlayer(e({},o,{mediaId:t}),i)}else C.error(this._component,"_createCollapsePlayer","No video player found")}_createStaticPlayer(t,i,n){if(this._potentialPlayerMap.stationaryRelated.length&&this._potentialPlayerMap.stationaryRelated[0].playerId){const s=this._potentialPlayerMap.stationaryRelated[0];this._createStationaryRelatedPlayer(e({},s,{mediaOrPlaylistId:t}),i,n)}else C.error(this._component,"_createStaticPlayer","No video player found")}_shouldRunAutoplayPlayers(){return!(!this._isVideoAllowedOnPage()||!this._potentialPlayerMap.stickyRelated.length&&!this._potentialPlayerMap.stickyPlaylist.length)}_determineAutoplayPlayers(){const e=this._component,t="VideoManagerComponent"===e,i=this._context;if(this._stickyRelatedOnPage)return void C.event(e,"stickyRelatedOnPage",t&&{device:i&&i.device,isDesktop:this._device}||{});const{player:n,playerElement:s}=this._checkPlayerSelectorOnPage("stickyPlaylist");n&&n.playerId&&n.playlistId&&s?this._createPlaylistPlayer(n,s):Math.random()<.01&&setTimeout((()=>{C.event(e,"noStickyPlaylist",t&&{vendor:"none",device:i&&i.device,isDesktop:this._device}||{})}),1e3)}_initializeRelatedPlayers(e){const t=new Map;for(let i=0;ie-t))}filterUsed(){this._map=this._map.filter((({dynamicAd:e})=>!e.used))}reset(){this._map=[]}constructor(){this._map=[]}}class Re extends De{}try{(()=>{const e=new B;e&&e.enabled&&(new xe(e,new Re).start(),new ke(new q(e),e).init())})()}catch(e){C.error("CLS","pluginsertion-iife",e),window.adthriveCLS&&(window.adthriveCLS.injectedFromPlugin=!1)}}();
Back to top
mobile desktop