Solved

Refresh webpage once upon load

Posted on 2011-09-26
4
331 Views
Last Modified: 2012-06-27
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
Comment
Question by:CDIT_Solutions
  • 2
  • 2
4 Comments
 
LVL 20

Accepted Solution

by:
Hendrik Wiese earned 250 total points
ID: 36598177
You can use Javascript for this: Please refer to http://stackoverflow.com/questions/1955164/refresh-page-only-time

Hope this helps. Cheers!!!
0
 

Author Comment

by:CDIT_Solutions
ID: 36598183
Thanks, I will give it a try when I can gain access to the server running the app.
0
 
LVL 20

Expert Comment

by:Hendrik Wiese
ID: 36598185
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
 

Author Comment

by:CDIT_Solutions
ID: 36598207
I usually work in PHP but in this case it is ASPX :o(  Thanks for the code now.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Read about why website design really matters in today's demanding market.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now