[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 357
  • Last Modified:

how to prevent aspx pages from being stored in internet temporary file's folder.

We have an asp.net web application so when the user requests pages from our server
the pages are stored in the temporary folder on the client machine also the js files are stored
on the client's machine + images.

How can we stop that using asp.net code behind files or html meta tags.
I don't want the pages,images and js files to be stored on user's computer.

I want nothing on the client's machine.


Thanks
0
LorneBackler
Asked:
LorneBackler
1 Solution
 
nauman_ahmedCommented:
Well, if to get a new data any time user visit the web page you can append a random number in the URL.  Will it work?

-Nauman.
0
 
praneethaCommented:
Response.Expires=0; try that
0
 
Arthur_WoodCommented:
why are you holding the code-behind files on the server?  What should be in the /bin folder on the server are the .aspx files and the .dlls of the app, and NOTHING else.

and how is the user saving copies of your app files on their computer?  I have never heard of this setup before.

AW
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LorneBacklerAuthor Commented:
Yes but we don't have .vb files on the server while developing the application you write code in the class files and

then render into dlls.

So while developing the application what should i write on page load event to say that when the code is executed
on the server and the html is returned back to user that html i don't want it to be stored on the client machine instead
after the user sees the page and kills the page i want that html source code to be destroyed.

Basically clear cache...


THNKS
0
 
dfaithenCommented:
As praneetha suggested you can set the page that is being stuck into cache to expire immediately, but beyond that I dont think that you can do anything else. The info has to be transmitted for the client to display it. The way that browsers work they display the version they just pulled into tmp. once they are there you cant do anything about them as they are outside the sandbox. So my advice is set for immediate expiration, and since there isnt anything hitting the client you arent sending, there shouldnt be anything highly sensitive anyway. I hope it clarifies things.
Duane
0
 
RogerSTHLMCommented:
I'm not sure why you want to "destroy" client side code when it's been shown, but if the reason is to avoid people steal your client scripts - just forget it. It cannot be done (there are lot of ways to make it harder, but nothing "safe").

If the reason is to prevent client side caching, there are some simple tasks to accomplish this. The one Microsoft recommends is the way that people here suggested (response.expires=0) maybe combined with some meta-tags in your html file. Personally I think this way often isn't completly reliable. A better approach to me, even though it puts a lot of entries in the client machine's "history", is to assure that your files querystring is unique.

Cheers
R
0
 
nauman_ahmedCommented:
If you have access to the IIS, you can also force the content expiration

IIS Manager -> Web Site Properties -> HTTP Headers -> Enable Content Expiration -> Expire Immidiately

That way you will be safe :)

HTH, Nauman.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now