?
Solved

Refresh webpage once upon load

Posted on 2011-09-26
4
Medium Priority
?
338 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
[X]
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
  • 2
  • 2
4 Comments
 
LVL 21

Accepted Solution

by:
Hendrik Wiese earned 1000 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

DFW AZURE MEETUP TONIGHT FRI 6PM

We will be discussing what Azure Stack is, how does it fit into the suit of offerings that Azure has currently, and where can it fit into your organizations technology stack. We will also be discussing limitations of the platform while covering various applicable scenarios.

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

764 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