¿Why there are ASPXs in "Temporary Internet files"?

J

Juan T. Llibre

If you copy any of those "aspx" files,
you'll see that no source code is found in it.

The actual file stored is in .htm format in the Temp internet
files folder, and contains the "rendered HTML" that your
original "aspx" file produced.



Juan T. Llibre
ASP.NET MVP
===========
 
N

Nicolás Castagnet

Hi,

I write this post because I notice a strange behavior related with
"Temporary Internet Files" and maybe some of you can help me to understand
it.

I am working in a web application with ASP.NET. Recently, I group of user
have problems with it because the values of the sessions were not stored
correctly (the application save the username in a login page, then other
page try to get it and the result was always ""). We restart the web server
and the asp.net session service, but the problem continues. Then, someone
says "Delete the temporary internet files" and eureka!!!!, the application
returned to life for those users.

Question 1: What is the relation between Temporary Internet Files and the
Session?

I start to examine the temporary files, and I find aspx files of my
application there.

Question 2 (and 3): Why there are aspx files in "Temporary Internet Files"?.
I don't want that Internet Explorer cache my aspx files, how can I avoid
this?

Thanks,
Nicolás
 
P

Peter Rilling

They don't need to be dynamic. IE does not necessarily know whether or not
they are dynamically generated. As far as IE know it is only fetching HTML
content. You could, after all, even map the ASPX file to the file extension
..foo and have those streamed and all IE sees is HTML. IE knows nothing
about where the content came from.
 
J

Juan T. Llibre

That is a client setting, not an ASP.NET setting.

However, you can -sort of- instruct IIS to
make clients cache the files you send for a
very short period of time.

To do that, open the IIS Manager
and scroll down to the desired website.

Highlight it, and select "Properties".

Then, select the "HTTP Headers" tab,
and click on the "Enable Content Expiration" checkbox.

Click on the "Expire Immediately" radio button,
and then click OK.

Most browsers will understand the HTTP header
sent by IIS when you configure that setting.

If the browser does not understand that sort of header,
though, it will continue to cache the files you send, but
most browsers will comply with the appended header.

You can implement server-side caching, too,
( look up "Output Cache" ) but that won't
affect client-side caching.



Juan T. Llibre
ASP.NET MVP
===========
 
N

Nicolás Castagnet

I had already seen it. But, why Internet Explorer need to waste time and
space saving the file there?. It shouldn't be cached because is dynamic. So,
the Internet Explorer must request it to the server each time it is needed,
doesn't it?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top