HTML change URL after an action-invoking-URL was processed

KarbutsKixbit

New Member
I find this problem hard to reword briefly in the title but this is what happens:A page (domain.com/pages) shows for example a table with rows from the database and for each row I provide a 'Delete' button. This button redirects for example to (domain.com/pages/delete/5) when row with ID 5 is deleted. When loading the page, it recognizes row 5 needs to be deleted, so it does so. Afterwards it continues loading as if (domain.com/pages) was requested. So now the table shows again, with row ID 5 deleted and the URL in the address bar being (domain.com/pages/delete/5). When refreshing it reloads (domain.com/pages/delete/5) but I want it to reload (domain.com/pages).So in short:
  • (domain.com/pages) -> show table
  • (domain.com/pages/delete/[id]) -> delete [id] from table -> show table
I don't want a redirect after the second link because I want to minimize redirection and keep site speed high. This could be fixed with AJAX calls, but that might complex things unnecessarily. Do I miss an easy way to make this action-invoking-URL just a one timer (ie. not invoked (accidentally) by refreshing)?
 
Back
Top