Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 643307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:16:07+00:00 2026-05-13T21:16:07+00:00

Looking at the previous implementation of a site that I’m working on, I can

  • 0

Looking at the previous implementation of a site that I’m working on, I can see that we have an options form that is calling a ManageObject.php script. That script does some actions on a number of objects, and then returns to the page via the following code:

echo "<script type=\"text/javascript\"> window.history.back();</script>";

My javascript skills are very beginner-ish, but what I can tell is that it’s just pressing the back button on the browser. This of course does not refresh the page, so all the data on that page is now old.

Is there a way to force a refresh on calling window.history.back()? Or is there a better way of calling the .php script without leaving the page and refreshing the page after the .php script has completed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T21:16:07+00:00Added an answer on May 13, 2026 at 9:16 pm

    There is a system called POST-redirect-GET, which solves this problem. It works like this:

    • A form is submitted with POST data to a php page
    • The php script processes the POST data, and then redirects the browser to another page
    • Since the browser was redirected using GET, a refresh of the page will not resend the POST data. Also, the data on the page will be updated.

    In PHP you can redirect by calling header("Location: /path/to/page.php"); followed by exit();. The advantage over the JavaScript way you posted in the question is that it does not require that the user has JavaScript enabled, and does not take the user to an intermediate page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am learning the PHP MVC pattern for my backend implementation. Looking at this
I am looking for a PHP CMS that gives me the ability to assign
I am new to Joda-Time and was looking at getting the previous working/week day.
I'm looking to add previous and next buttons to the SoundCloud custom player, which
Looking for something like: $(input:radio:checked).previous(name, original_name).attr(name,new_name); I tried a few different seen around here
In a previous question , I was looking for an alternative to modifying how
Following on from a previous question relating to heap usage restrictions , I'm looking
Looking at some assembly code for x86_64 on my Mac, I see the following
Looking to do a bit of refactoring... Using NHibernate I have this query currently
Looking at the Ehcahce implementation of net.sf.cache.JS107, I am trying to achieve the following

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.