Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Refresh webpage once upon load

Posted on 2011-09-26
4
334 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 21

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 21

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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
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ā€¦
The viewer will learn how to count occurrences of each item in an array.

792 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