/    Sign up×
Community /Pin to ProfileBookmark

Forced Reloading

grabImage = new Image();
grabImage.src=”/system/logit.php”;

I know when your looking at this you must think I’m crazy but the commands above do in fact call and run the php script. but it can only be run once in the life of the page that made the call. thats because it’s loaded into cache.

is there a way to force a reload without having to refresh the whole page, so the image/php script in the cache is overwritten and reloaded on command?

This way the script can be run a number of times.

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@ibidris2003Aug 03.2003 — Hi,

yes you will have to split your document with frames.

http://galileo.spaceports.com/~ibidris/
Copy linkTweet thisAlerts:
@DaveRasauthorAug 04.2003 — I wish to thank ibidris2003 for his help. He gave me many ideas.

I was able to work out how to get around my problem by placing the following lines in my php script which stops the caching of the img allowing the 2nd php script to be run multiable times.



header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");

header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

header("Cache-Control: no-store, no-cache, must-revalidate");

header("Cache-Control: post-check=0, pre-check=0", false);

header("Pragma: no-cache");
×

Success!

Help @DaveRas spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...