Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C# ASP.NET Javascript CSS
how to delete css, javascript file from browser cache from codebehind?
Posted 15-Jan-13 23:36pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

you can't clear the browser cache form the code behind. code behind files are executed on the server side. (Assuming your project is ASP.NET). And also, as far as I know, you can't clear browser cache using client side script such as javscript etc..
you can clear the application cache pragmatically.
$('.button').click(function() {
        url: "",
        context: document.body,
        success: function(s,x){
        $('html[manifest=saveappoffline.appcache]').attr('content', '');
or you have to disable the cache control
<meta http-equiv='cache-control' content='no-cache'>
<meta http-equiv='expires' content='0'>
<meta http-equiv='pragma' content='no-cache'>
or you have to load your files(css/images/script) as following like way
?modified=20130116044521 is a dynamic parameter just like current-time-stamp
Application cache[^]
please check the following link for more caching information[^]
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You can't...

what you can do you can set expire of cache : Link[^]
Or No cache.

But you can't remove client temp file from code behind.
ashuslove at 23 hrs ago
I have ample number of the jquery in all the pages if i am going to change this manually it will take a month. If you can help me to resolve in all without coding to each page

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

  Print Answers RSS
0 Richard MacCutchan 269
1 Aajmot Sk 252
2 Marcin Kozub 235
3 Sergey Alexandrovich Kryukov 185
4 Praneet Nadkar 167
0 OriginalGriff 7,913
1 Sergey Alexandrovich Kryukov 7,232
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,865

Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 16 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100