Opened 4 months ago

#23367 new enhancement

Remove message parameters fron admin URl's in the browser address bar

Reported by: mark-k Owned by:
Priority: normal Milestone: Awaiting Review
Component: General Version:
Severity: minor Keywords:
Cc:

Description

Scenario: When a post is being published successfully "message=6" is appended to the URL. If I refresh the page while in that state I will get the "post published" message again, although nothing was done.

There is probably nothing functionally wrong with the way things work now but it can be esthetically more pleasant if that parameter was removed which in turn will eliminate the message problem.

This can be done on browsers that support the history API of HTML5. The following piece of code can be used after displaying the message or maybe it can be generalized to work in the admin footer.

<script type="text/javascript" charset="utf-8">
  url = the canonical URL for the address
  if (typeof history.replaceState === 'function') { // check html5 functionality support
    data = {dummy:true};
    history.replaceState(data,'',url);
  }
</script>

Change History (0)

Note: See TracTickets for help on using tickets.