/    Sign up×
Community /Pin to ProfileBookmark

Will refresh work in correct way?

I like to set Refresh function with image.

Is this correct?

[code=php]

<a href=”#”onclick=”javascript:location.reload(true)”>
<img alt=”Refresh” src=”images/myrefresh.gif” />
</a>

[/code]

Is possibility to set F5 in this way? (Clear Cash values)

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@MrSnowDropApr 13.2011 — Inside an "onclick" statement you don't have to start with "javascript:" syntax; besides, it's appropriate to correct your code this way:

[CODE]
[COLOR="Navy"]<a href="#" onclick="[COLOR="DarkRed"]window.location.reload();[/COLOR]">
<img alt="Refresh" src="images/myrefresh.gif">
</a>[/COLOR][/CODE]
Copy linkTweet thisAlerts:
@toplisekauthorApr 13.2011 — Is possibility to set F5 in this way?
Copy linkTweet thisAlerts:
@MrSnowDropApr 13.2011 — I'm not sure to really understand your need...

If you press the "F5" key, a page will refresh independently from the source code; the above script is a shortcut to refresh the page without the need to search and press the function key over the keyboard.
Copy linkTweet thisAlerts:
@toplisekauthorApr 13.2011 — Maybe I made mistake. There is function CTRL+F5. This will delete stored Cash memory.
Copy linkTweet thisAlerts:
@WolfShadeApr 13.2011 — http://devel.lubong.com/2007/06/24/javascript-how-to-force-page-to-reload/

AFAIK, there is no way to clear the cache using JavaScript - that is in the browser settings. The URL above explains the way to refresh the page [I]while skipping the cached content and getting fresh content from the server[/I].
×

Success!

Help @toplisek 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.1,
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: @meenaratha,
tipped: article
amount: 1000 SATS,

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

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