Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Refreshing on load Problem
Old 09-04-2005, 08:51 PM Refreshing on load Problem
lothop's Avatar
Ultra Talker

Posts: 303
Trades: 0
HTML Code:
<script language="JavaScript" type="text/javascript">
<!--
var reloaded = false;
var loc=""+document.location;
loc = loc.indexOf("?reloaded=")!=-1?loc.substring(loc.indexOf("?reloaded=")+10,loc.length):"";
loc = loc.indexOf("&")!=-1?loc.substring(0,loc.indexOf("&")):loc;
reloaded = loc!=""?(loc=="true"):reloaded;

function reloadOnceOnly() {
    if (!reloaded) 
        window.location.replace(window.location+"&?reloaded=true");
}
</script>
<body onload="reloadOnceOnly()">
I'm currently using this to refresh the page ONCE on load.
It works fine, except when I use
HTML Code:
<a href="javascript: history.go(-1)">Click to go back</a>
Thing is, I use PHP to delete the user, then it says " User Deleted, Click to go back" they click back, but it doesnt update the userlist until it is manually refreshed.

Anyone have any idea how I can make it refresh always? (only once per page load though)


Thankyou,
Greg
__________________
Websites Created;
warscope.com
ratepayers.org.nz
lothop is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-12-2005, 12:25 AM
funkdaddu's Avatar
Web Design Snob

Posts: 635
Trades: 0
if you're using PHP, can't you use "header("Cache-Control: no-cache, must-revalidate"); " to always force a new copy of the page and to not cache the page?
funkdaddu is offline
Reply With Quote
View Public Profile Visit funkdaddu's homepage!
 
Reply     « Reply to Refreshing on load Problem
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.09938 seconds with 12 queries