Deletes the current page or the specified number of pages back in the history.


Delete has one optional parameter that it accepts.

Name Type Description Default
Pages Integer The number of pages back into the history to delete. 0


Delete returns the URL of the last page it deleted. This is primarily for internal use by History.


If you want to delete the current page from the history:


This is identical to:


To delete the current and previous page, we delete up to 1 pages back:


Obviously it's easy to go from there and know that supplying 2 will delete the current page and 2 pages back into the history and so on.