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.
CDIT_SolutionsAsked:
Who is Participating?
 
Hendrik WieseConnect With a Mentor Information Security ManagerCommented:
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 WieseInformation Security ManagerCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.