Click here to Skip to main content
15,887,411 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,


Iam creating a paint application in html5. I also use javascript and css.
Each time when I draw and save an image I am storing the image in browser cache using HTML5 local storage. And these images are retrieved and dispayed as a gallery.
But each time when I save the image,I should refresh the page so that the saved image will appear in the gallery.

So I want to know is there any way to refresh the browser cache through javascript or HTML code.

Thanks in Advance
Posted

1 solution

XML
<html>
<head>
<script type="text/javascript">
function refresh()
{
window.location.href="Enter your Link here"
}
</script>
</head>
<body>



<button type="button" onclick="refresh()">Refresh Now</button>

</body>
</html>


so on the button click the page wil be refreshed. You can write this line "window.location.href" into your script which saves the image.

hope this works for you.
 
Share this answer
 
Comments
Zian Ziyad 23-Sep-11 8:59am    
I dont want to refresh the whole page, i just want to refresh the browser cache.... without refreshing the page.
NiyaNeel 26-Sep-11 1:08am    
I don't want to refresh my page. Without refreshing the page is there any way??
please suggest!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900