Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

My Browser Wont Truly Refresh! (Win2000&ASP)

Status
Not open for further replies.

frOblivion

Programmer
Jan 2, 2001
14
0
0
US
I am using Win2000pro, IIS 5, IE 5 and ASP. I clear my internet History, empty my temp folders, click refresh 100 times and still my browser is not recompiling my scripts. It is just showing me the HTML output from old versions of the script. This just started happening, I'm not sure why, I haven't been futsing with any settings.

Anyone heard of this?
 
Hi,

Be sure you update the correct folder! Second, delete the temporary internet files (you already did that). Third, restart your IIS.
Good Luck!

Regards,
Luís Silva
 
If you're using a frameset you have to SHIFT-Refresh. Make sure you save your changes before trying to view them. Put in testing statement to make sure it is a refresh problem, not a problem with your expectations. It's probably something simple like this.
 
For future reference, if its important that your scripts are run each and every time they are accessed then you can add the line:

Response.Expires=0

to your asp file at the top. This forces your browser to reload the page each time it is accessed and not simply display cached output. I found it very handy when doing asp with flash (the flash movie kept retrieving old output and there was no way of refreshing the asp page underlying the movie).
 
Regarding Response.Expires, I've read that setting it to a negative number is better because setting it to 0 doesn't always work.
 
You can use response.expireabsolute=#01/01/70# to make sure that your page will not bet get from the catch
 
I'm having the same problem discussed earlier about flash using older asp scripts until the cache is emptied.

HotMadras, i was hoping you could give me some instructions on how to resolve my problem.

I'm using Flash as the front-end,MS Access as the backend database, and ASP as my server side script.

I've been able to display data in Flash from my database.

In flash, i have a movie which has a movie clip. This movie clip has a blank movie clip. So my blank movie clip is 2 levels down. This blank movie clip displays data from the database. When i make a change in the database, flash doesn't display the updated data until i clear the cache or hit CTRL+F5 twice.

When i include Response.Expires=0 at the top of my ASP page, no data from the database is displayed in Flash. I've also tried using the following code at the top of my page:
<%
Response.Expires = 15
Response.ExpiresAbsolute = Now() - 2
Response.AddHeader &quot;pragma&quot;,&quot;no-cache&quot;
Response.AddHeader &quot;cache-control&quot;,&quot;private&quot;
Response.CacheControl = &quot;no-cache&quot;
%>
but with no luck. Nothing is displayed. Even old data is not displayed.

Do i need to include some code within flash or am i missing something in my ASP pages?

The following is code for one of my ASP pages with which the refresh problem is occurring.

<%@Language=&quot;VBScript&quot;%>
<%Option Explicit%>
<%
Response.Expires = 15
Response.ExpiresAbsolute = Now() - 2
Response.AddHeader &quot;pragma&quot;,&quot;no-cache&quot;
Response.AddHeader &quot;cache-control&quot;,&quot;private&quot;
Response.CacheControl = &quot;no-cache&quot;
%>
<!--#include file=&quot;datastore.asp&quot;-->

<%
Dim objRS, objConn,counter,x
dim subHeadings()
x=0
counter=0

'global variable
'myVar = request.form(&quot;getSubTitles&quot;)

Set objRS = Server.CreateObject(&quot;ADODB.Recordset&quot;)
Set objConn = Server.CreateObject(&quot;ADODB.Connection&quot;)

objConn.Open strConnect

'retrieve all subheadings where flag is 1 and where sector equals flash variable 'getSubTitles'
objRS.Open &quot;SELECT heading FROM Subheadings WHERE flag=1 AND sector=&quot; & request.form(&quot;getSubtitles&quot;) , objConn

'find number of records.
while not objRS.EOF
counter = counter + 1
objRS.movenext
wend
objRS.close

'resize array to size of num of records
redim subHeadings(counter)

'run query again
objRS.Open &quot;SELECT heading FROM Subheadings WHERE flag=1 AND sector=&quot; & request.form(&quot;getSubtitles&quot;), objConn

'populate array
while not objRS.EOF
'insert subheading into array
subHeadings(x) = objRS.fields(&quot;heading&quot;)
objRS.MoveNext
'print out values in variables used in flash
response.write &quot;setSubtitles&quot; & x & &quot;=&quot; & subHeadings(x) & &quot;&&quot;
x = x+1
wend

'return number of subheadings to flash in the subNum variable
response.write &quot;subNum=&quot; & counter

objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top