• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 345
  • Last Modified:

Refresh webpage once upon load

I have been asked to enter some code onto an online application's login page that will make the page refresh once when loaded.

For some reason the username field should state "STAFF\" within it, this happens if the user presses F5 manually.

I have tried a meta refresh line of code which works but it creates a looping effect which is no good, we just want one refresh.
0
CDIT_Solutions
Asked:
CDIT_Solutions
  • 2
  • 2
1 Solution
 
Hendrik WieseCommented:
You can use Javascript for this: Please refer to http://stackoverflow.com/questions/1955164/refresh-page-only-time

Hope this helps. Cheers!!!
0
 
CDIT_SolutionsAuthor Commented:
Thanks, I will give it a try when I can gain access to the server running the app.
0
 
Hendrik WieseCommented:
You could also use php to do this: You will just need to change the index.php to your page.

[php]if (!isset($_GET['reload'])) {
echo '<meta http-equiv=Refresh content="0;url=index.php?reload=1">';
}[/php]
0
 
CDIT_SolutionsAuthor Commented:
I usually work in PHP but in this case it is ASPX :o(  Thanks for the code now.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now