Make WordPress Core

Opened 14 years ago

Closed 13 years ago

#20317 closed enhancement (wontfix)

Delete auto-draft using window.onbeforeunload

Reported by: scribu Owned by:
Priority: low Milestone:
Component: General Version:
Severity: normal Keywords: 2nd-opinion
Cc: Focuses:

Description

When a user goes to post-new.php, a new auto-draft post is created.

Old auto-drafts are garbage-collected: #19663

To lessen the need for GC, we could send an AJAX request to delete the auto-draft immediately when the user navigates away from the page (but not when he presses the Submit button).

Change History (3)

#1 follow-up: @scribu
14 years ago

  • Keywords 2nd-opinion added

The only problem I see would be when a user presses the Back button and then presses Forward again. Since the screen is loaded from memory instead of doing a new request, they would end up with an invalid post ID.

#2 @scribu
14 years ago

  • Summary Delete auto-draft on unloadDelete auto-draft using window.onbeforeunload

#3 in reply to: ↑ 1 @nacin
13 years ago

  • Milestone Awaiting Review
  • Resolutionwontfix
  • Status newclosed

Replying to scribu:

The only problem I see would be when a user presses the Back button and then presses Forward again. Since the screen is loaded from memory instead of doing a new request, they would end up with an invalid post ID.

Or refreshes. These seem like more trouble than its worth. Closing. Totally fine if someone wanted to patch it and reopen it at a later date, though.

Note: See TracTickets for help on using tickets.