Internet Explorer creates temp file from an asp page.

Discussion in 'ASP General' started by James_101, Apr 9, 2005.

  1. James_101

    James_101 Guest

    My training piece is in Authorware. The user logs in with last name and a
    four-digit number. Authorware sends this user identifier to an asp page
    called db_read.asp. This file sends a SQL SELECT command to a Microsoft
    Access database. The database returns either the record that was selected or
    a "no record" message. The db_read.asp file relays this information to
    Authorware. If a record was returned, Authorware displays it. If there is
    no record, Authorware displays the message "You have logged in for the first
    time".

    Later when the user exits Authorware , the Authorware file takes one of two
    actions. If a record was returned from the database following log-in, then
    Authorware runs an asp file called db_update.asp to update the record in
    Access. If no record was return, Authorware runs an asp file called
    db_add.asp to add a new record to the database.

    All of this runs fine on my computer which has IE 6.0, Win XP and IIS. My
    customer has IE 6.0, Win 2000 and IIS and the customer has an issue. The 1st
    login goes correctly. Authorware displays the messge "You have logged in for
    the first time" and upon exit, a new record is added to the database. During
    this login, however, an internet temporary file is created for the file
    db_read.asp. When the customer logs in for the second time with the same
    last name and four-digit number, the screen again displays "You have logged
    in for the first time" (the screen should have displayed the record). After
    exit, the database has added a second, identical record (the database should
    have updated the first record, not add a second one).

    After the 1st login, if the customer deletes the temporary file, the 2nd
    login runs correctly.

    IE does not create temporary files for the other two asp files.

    Any suggestions on how I can resolve this issue?

    Thanks.

    Jim Bowman
    James_101, Apr 9, 2005
    #1
    1. Advertising

  2. James_101

    Evertjan. Guest

    =?Utf-8?B?SmFtZXNfMTAx?= wrote on 09 apr 2005 in
    microsoft.public.inetserver.asp.general:

    > All of this runs fine on my computer which has IE 6.0, Win XP and IIS.
    > My customer has IE 6.0, Win 2000 and IIS and the customer has an
    > issue. The 1st login goes correctly. Authorware displays the messge
    > "You have logged in for the first time" and upon exit, a new record is
    > added to the database. During this login, however, an internet
    > temporary file is created for the file db_read.asp. When the customer
    > logs in for the second time with the same ....
    >


    Well, not exactly.

    The html rendering of the asp output is cached on the client,
    not the asp file itself.

    Use:

    <% Response.Expires = 0 %>

    and try again.

    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)
    Evertjan., Apr 9, 2005
    #2
    1. Advertising

  3. James_101

    James_101 Guest

    Thank you Evertjan. In researching this code, sometimes I see it as
    Response.Expires and at other times it's Response.expires. Is uppercase vs
    lowercase not important?

    The html rendering of the output for the file db_read.asp is cached but the
    output for the files db_add.asp and db_update.asp is not cached. Any
    thoughts on why the output for one file is cached and not the other two?

    Thank you.

    Jim

    "Evertjan." wrote:

    > =?Utf-8?B?SmFtZXNfMTAx?= wrote on 09 apr 2005 in
    > microsoft.public.inetserver.asp.general:
    >
    > > All of this runs fine on my computer which has IE 6.0, Win XP and IIS.
    > > My customer has IE 6.0, Win 2000 and IIS and the customer has an
    > > issue. The 1st login goes correctly. Authorware displays the messge
    > > "You have logged in for the first time" and upon exit, a new record is
    > > added to the database. During this login, however, an internet
    > > temporary file is created for the file db_read.asp. When the customer
    > > logs in for the second time with the same ....
    > >

    >
    > Well, not exactly.
    >
    > The html rendering of the asp output is cached on the client,
    > not the asp file itself.
    >
    > Use:
    >
    > <% Response.Expires = 0 %>
    >
    > and try again.
    >
    > --
    > Evertjan.
    > The Netherlands.
    > (Replace all crosses with dots in my emailaddress)
    >
    >
    James_101, Apr 9, 2005
    #3
  4. James_101

    Evertjan. Guest

    =?Utf-8?B?SmFtZXNfMTAx?= wrote on 09 apr 2005 in
    microsoft.public.inetserver.asp.general:
    > "Evertjan." wrote:
    >
    >> =?Utf-8?B?SmFtZXNfMTAx?= wrote on 09 apr 2005 in
    >> microsoft.public.inetserver.asp.general:
    >>
    >> > All of this runs fine on my computer which has IE 6.0, Win XP and
    >> > IIS.
    >> > My customer has IE 6.0, Win 2000 and IIS and the customer has an
    >> > issue. The 1st login goes correctly. Authorware displays the
    >> > messge "You have logged in for the first time" and upon exit, a new
    >> > record is added to the database. During this login, however, an
    >> > internet temporary file is created for the file db_read.asp. When
    >> > the customer logs in for the second time with the same ....
    >> >

    >>
    >> Well, not exactly.
    >>
    >> The html rendering of the asp output is cached on the client,
    >> not the asp file itself.
    >>
    >> Use:
    >>
    >> <% Response.Expires = 0 %>
    >>
    >> and try again.
    >>


    [please do not toppost on usenet]

    > Thank you Evertjan. In researching this code, sometimes I see it as
    > Response.Expires and at other times it's Response.expires. Is
    > uppercase vs lowercase not important?


    No it is not. ASP server directives and VBS are not case sensitive.

    However Jscript is!

    > The html rendering of the output for the file db_read.asp is cached
    > but the output for the files db_add.asp and db_update.asp is not
    > cached. Any thoughts on why the output for one file is cached and not
    > the other two?


    Did you add

    <% Response.Expires = 0 %>

    as the first line of all these 3 asp pagefiles???



    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)
    Evertjan., Apr 9, 2005
    #4
  5. James_101

    James_101 Guest

    I have not yet added Response.Expires=0 to any asp page.

    There are two computer systems. On mine (WinXP, IE 6.0), no temporary files
    are created for the output of any of the 3 asp files.

    On my customer's system (Win2000, IE 6.0), a temp file is created for the
    output of db_read.asp but not for db_add.asp or db_update.asp. I will have
    the customer add the needed code on Monday, Apr 11.

    The db_read.asp file contains the code Response.write (var name). The files
    db_add.asp and db_update.asp do not contain Response.write. They form an SQL
    INSERT or UPDATE statement, create a connection to a database, use the
    execute method to send the SQL query, and then close the database connection.
    Does this explain the fact that the customer's computer system saves the
    output of db_read.asp as a temp file and not db_add.asp or db_update.asp?

    Should Response.expires=0 be placed at the beginning of the asp page or is
    the location not important?

    Thanks.

    Jim

    "Evertjan." wrote:

    > =?Utf-8?B?SmFtZXNfMTAx?= wrote on 09 apr 2005 in
    > microsoft.public.inetserver.asp.general:
    > > "Evertjan." wrote:
    > >
    > >> =?Utf-8?B?SmFtZXNfMTAx?= wrote on 09 apr 2005 in
    > >> microsoft.public.inetserver.asp.general:
    > >>
    > >> > All of this runs fine on my computer which has IE 6.0, Win XP and
    > >> > IIS.
    > >> > My customer has IE 6.0, Win 2000 and IIS and the customer has an
    > >> > issue. The 1st login goes correctly. Authorware displays the
    > >> > messge "You have logged in for the first time" and upon exit, a new
    > >> > record is added to the database. During this login, however, an
    > >> > internet temporary file is created for the file db_read.asp. When
    > >> > the customer logs in for the second time with the same ....
    > >> >
    > >>
    > >> Well, not exactly.
    > >>
    > >> The html rendering of the asp output is cached on the client,
    > >> not the asp file itself.
    > >>
    > >> Use:
    > >>
    > >> <% Response.Expires = 0 %>
    > >>
    > >> and try again.
    > >>

    >
    > [please do not toppost on usenet]
    >
    > > Thank you Evertjan. In researching this code, sometimes I see it as
    > > Response.Expires and at other times it's Response.expires. Is
    > > uppercase vs lowercase not important?

    >
    > No it is not. ASP server directives and VBS are not case sensitive.
    >
    > However Jscript is!
    >
    > > The html rendering of the output for the file db_read.asp is cached
    > > but the output for the files db_add.asp and db_update.asp is not
    > > cached. Any thoughts on why the output for one file is cached and not
    > > the other two?

    >
    > Did you add
    >
    > <% Response.Expires = 0 %>
    >
    > as the first line of all these 3 asp pagefiles???
    >
    >
    >
    > --
    > Evertjan.
    > The Netherlands.
    > (Replace all crosses with dots in my emailaddress)
    >
    >
    James_101, Apr 9, 2005
    #5
  6. James_101

    Evertjan. Guest

    =?Utf-8?B?SmFtZXNfMTAx?= wrote on 09 apr 2005 in
    microsoft.public.inetserver.asp.general:

    > I have not yet added Response.Expires=0 to any asp page.


    I wrote:
    > [please do not toppost on usenet]


    Please follow usenet netiquette.

    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)
    Evertjan., Apr 9, 2005
    #6
  7. James_101

    James_101 Guest

    Sorry, I was not familiar with topposting.

    You asked: Did you add
    <% Response.Expires = 0 %>
    as the first line of all these 3 asp pagefiles???

    I have not yet added Response.Expires=0 to any asp page.

    There are two computer systems. On mine (WinXP, IE 6.0), no temporary files
    are created for the output of any of the 3 asp files.

    On my customer's system (Win2000, IE 6.0), a temp file is created for the
    output of db_read.asp but not for db_add.asp or db_update.asp. I will have
    the customer add the needed code on Monday, Apr 11.

    The db_read.asp file contains the code Response.write (var name). The files
    db_add.asp and db_update.asp do not contain Response.write. They form an SQL
    INSERT or UPDATE statement, create a connection to a database, use the
    execute method to send the SQL query, and then close the database connection.
    Does this explain the fact that the customer's computer system saves the
    output of db_read.asp as a temp file and not db_add.asp or db_update.asp?

    Should Response.expires=0 be placed at the beginning of the asp page or is
    the location not important?

    Jim
    James_101, Apr 9, 2005
    #7
  8. James_101

    Evertjan. Guest

    =?Utf-8?B?SmFtZXNfMTAx?= wrote on 09 apr 2005 in
    microsoft.public.inetserver.asp.general:

    > Sorry, I was not familiar with topposting.
    >
    > You asked: Did you add
    > <% Response.Expires = 0 %>
    > as the first line of all these 3 asp pagefiles???
    >
    > I have not yet added Response.Expires=0 to any asp page.


    Please do!

    > There are two computer systems. On mine (WinXP, IE 6.0), no temporary
    > files are created for the output of any of the 3 asp files.


    No, no, teporary files are something else as cache files.

    The ASP-file is and remains on the server, and is the source for a html
    file that is sent to the client [with an asp extension]

    cashe files have nothing to do with asp, but are always generated by IE
    on the client. ONLY the [view-source invisible] header of the sent [html-
    like] file contains a expiration directive, that can be set with thwe
    above asp command <% Response.Expires = 0 %>

    > On my customer's system (Win2000, IE 6.0), a temp file is created for
    > the output of db_read.asp but not for db_add.asp or db_update.asp. I
    > will have the customer add the needed code on Monday, Apr 11.


    OK.

    > The db_read.asp file contains the code Response.write (var name). The
    > files db_add.asp and db_update.asp do not contain Response.write.


    No matter:

    <% Response.write "<br>Hello World<br>" %>

    and

    <% = "<br>Hello World<br>" %>

    and

    <%
    t = "<br>Hello World<br>"
    Response.write t
    %>

    and

    <br>Hello World<br>

    render the same html code.

    > They form an SQL INSERT or UPDATE statement, create a connection to a
    > database, use the execute method to send the SQL query, and then close
    > the database connection.
    > Does this explain the fact that the customer's computer system saves
    > the
    > output of db_read.asp as a temp file and not db_add.asp or
    > db_update.asp?


    No, because only html code [and possibly clientside scripting, if you
    entered that,] reaches the client. The client [read clientside browser]
    does not know and does not care if the html originated from serversided
    database interrogation. If you doubt that, do extensive clientside view-
    sourcing on your files.

    > Should Response.expires=0 be placed at the beginning of the asp page
    > or is the location not important?


    It is customary and probably necessary to put it at the beginning, at
    least before the code that renders html output.

    ===========

    [The above way of answering is called interquoting and is the preferred
    way of the one to many communication used on usenet the last 30 years]

    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)
    Evertjan., Apr 9, 2005
    #8
  9. James_101

    James_101 Guest

    Let's see if I understand what you have taught me.

    When the client runs my authoring program and the program calls any of the
    asp pages (db_read.asp, db_add.asp or db_update.asp), Microsoft IIS reads
    and executes the commands in the asp page. Then IIS sends the resulting html
    page to the client browser which saves certain data in a cache. If the
    authoring program again calls the same asp page, the client browser may
    ignore the resulting html page and instead use the data cached earlier.

    To prevent this inaccuracy, I place Response.expires=-1 as the first command
    in my asp page so it reads:

    <%@ language=VBScript%>
    <% Option Explicit %>
    <%

    Response.expires = -1

    (then all current code)

    I am using -1 because one article indicated that time zone differences
    between the server and client would affect Response.expires=0.
    Response.expires=-1 always causes the cached data to expire immediately.

    Is all of this correct?

    Jim
    James_101, Apr 10, 2005
    #9
  10. James_101

    Evertjan. Guest

    Jim wrote on 10 apr 2005 in
    microsoft.public.inetserver.asp.general:
    > Let's see if I understand what you have taught me.


    "you"?

    Who are you talking to, Jim?

    You are posting to thousands of readers all over the world now via usenet
    and many more in the years to come via the usenet archive.

    So please quote part of the post you are reacting on, starting the quote
    with particulars of the sender. see above.

    This is not email. This is not the web. This is usenet.

    > When the client runs my authoring program


    What authoring program?
    On the client's machine?
    Doesn't the client simply run a browser, i.c. IE?

    > and the program calls any of


    I expect you simply mean a clientside browser.

    > the asp pages (db_read.asp, db_add.asp or db_update.asp), Microsoft
    > IIS reads and executes the commands in the asp page. Then IIS sends
    > the resulting html page to the client browser


    Yes, a html page with a .asp extension, but not the asp source file.

    > which saves certain data in a cache.


    No, not certain data but that whole html page, including expiry date and
    some other things, [all depending on the "correctnes" browser, but let us
    presume said IE]

    > If the authoring program again calls the same asp page,
    > the client browser may ignore the resulting html page and instead use
    > the data cached earlier.


    Yes if the page is not expired and the cache is not disabled or
    overfilled and ...

    > To prevent this inaccuracy,


    It is not an inaccuracy, but a very usefull idea for the web, preventing
    lots of unnecessary trafic and waiting time. In your special case, for
    some special pages, you don't want this behavour.

    > I place Response.expires=-1 as the first
    > command in my asp page so it reads:
    >
    > <%@ language=VBScript%>
    > <% Option Explicit %>
    > <%
    >
    > Response.expires = -1


    <%@ language=VBScript%>
    <%
    Response.expires = 0
    Option Explicit

    > (then all current code)
    >
    > I am using -1 because one article indicated that time zone differences
    > between the server and client would affect Response.expires=0.
    > Response.expires=-1 always causes the cached data to expire
    > immediately.


    No, I think all these are stored as UTC and anyway that one minute won't
    cover even one hour of timezone difference, let alone 23 hours.

    It will perhaps cover clientside clock innaccuracies, but one can see
    clients with a local clock set to a year 2012 date. So why one minute, if
    the effects exists at all, which I am not sure about?

    > Is all of this correct?


    Make your own conclusions. ;-}

    > Jim


    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)
    Evertjan., Apr 10, 2005
    #10
  11. James_101

    James_101 Guest

    Got it! Thanks for the help Evertjan.

    Jim
    James_101, Apr 10, 2005
    #11
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    570
    Mark P
    May 9, 2005
  2. utabintarbo

    Python creates "locked" temp dir

    utabintarbo, Dec 7, 2010, in forum: Python
    Replies:
    5
    Views:
    656
    utabintarbo
    Dec 16, 2010
  3. A. Farber
    Replies:
    3
    Views:
    255
    Ben Morrow
    Mar 3, 2004
  4. MoshiachNow
    Replies:
    0
    Views:
    127
    MoshiachNow
    Dec 4, 2006
  5. PerlFAQ Server
    Replies:
    0
    Views:
    258
    PerlFAQ Server
    Apr 26, 2011
Loading...

Share This Page