Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP page always displays Old File content.

ASP page always displays Old File content.

Scheduled Pinned Locked Moved Web Development
tutoriallearning
8 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    BlrBoy
    wrote on last edited by
    #1

    Hello All, I am beginner for Web. I want to display content of a file in my page. File is of type TXT and it is present in web root directory. I am developing in ASP and target OS are Windows XP and Windows 2000. I have provided a link to that file in my ASP page. When user clicks the link that file has to be opened. TXT file gets updated with new data frequently and I have to show the latest content of the file. For first time the page is displaying the file content properly. But from then, it is displaying Old content of the file and not updated content of the file. After analyzing I found that the file is getting copied to Temp Internet folder and it is using the file each and every time for displaying. If i delete the file from Temp Internet Folder or rename it it is working fine. If I manually do Refresh also it is displaying updated content. Please let me know how to make ASP page to be reloaded each time and not to take from Temp Internet folder using cookies. Thanks for your time. Ravi

    G A V 3 Replies Last reply
    0
    • B BlrBoy

      Hello All, I am beginner for Web. I want to display content of a file in my page. File is of type TXT and it is present in web root directory. I am developing in ASP and target OS are Windows XP and Windows 2000. I have provided a link to that file in my ASP page. When user clicks the link that file has to be opened. TXT file gets updated with new data frequently and I have to show the latest content of the file. For first time the page is displaying the file content properly. But from then, it is displaying Old content of the file and not updated content of the file. After analyzing I found that the file is getting copied to Temp Internet folder and it is using the file each and every time for displaying. If i delete the file from Temp Internet Folder or rename it it is working fine. If I manually do Refresh also it is displaying updated content. Please let me know how to make ASP page to be reloaded each time and not to take from Temp Internet folder using cookies. Thanks for your time. Ravi

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      Check the settings of the Temporary Internet Files. By default it's something like 10% of the disk space, which can be way too much with the large disks we have today. Set it to some reasonable value, like 50 MB. It's common that the View Source command stops working because of this. I believe that your problem may have the same reason. --- b { font-weight: normal; }

      1 Reply Last reply
      0
      • B BlrBoy

        Hello All, I am beginner for Web. I want to display content of a file in my page. File is of type TXT and it is present in web root directory. I am developing in ASP and target OS are Windows XP and Windows 2000. I have provided a link to that file in my ASP page. When user clicks the link that file has to be opened. TXT file gets updated with new data frequently and I have to show the latest content of the file. For first time the page is displaying the file content properly. But from then, it is displaying Old content of the file and not updated content of the file. After analyzing I found that the file is getting copied to Temp Internet folder and it is using the file each and every time for displaying. If i delete the file from Temp Internet Folder or rename it it is working fine. If I manually do Refresh also it is displaying updated content. Please let me know how to make ASP page to be reloaded each time and not to take from Temp Internet folder using cookies. Thanks for your time. Ravi

        A Offline
        A Offline
        alexey N
        wrote on last edited by
        #3

        Add Meta tag to html: Best regards, Alexey.

        B 1 Reply Last reply
        0
        • A alexey N

          Add Meta tag to html: Best regards, Alexey.

          B Offline
          B Offline
          BlrBoy
          wrote on last edited by
          #4

          Alexey, I am using ASP. How to implement in ASP this TAG? I used same code

          alexey N wrote:

          in ASP but the result is same. Regards Ravi

          A 1 Reply Last reply
          0
          • B BlrBoy

            Alexey, I am using ASP. How to implement in ASP this TAG? I used same code

            alexey N wrote:

            in ASP but the result is same. Regards Ravi

            A Offline
            A Offline
            alexey N
            wrote on last edited by
            #5

            Ough, I forgot, it must be inside tag. Untitled Page ... Best regards, Alexey.

            B 1 Reply Last reply
            0
            • A alexey N

              Ough, I forgot, it must be inside tag. Untitled Page ... Best regards, Alexey.

              B Offline
              B Offline
              BlrBoy
              wrote on last edited by
              #6

              I updated the code as you told but result is same I am giving the code here. Let me know where is the problem <%@ LANGUAGE="VBSCRIPT" %>

              <%Dim ValueRad%> <%ValueRad = Request.Form("RadBtn") Response.Write "ScenarioName = " &ValueRad%> <%Dim ObjIpIvrWebCom%> <%set ObjIpIvrWebCom = Server.CreateObject("IpIvrWebCom.WebCom.1")%> <%Dim retVal%> <%retVal = ObjIpIvrWebCom.GetLogFilePath(ValueRad)%>
              <%retVal = "SampleBanking.txt"%> <%Response.Write "retVal = " &retVal if (retVal <> "") then %>
              Scenario ID <%= ValueRad %>'s file log
              <%End if%>

              <%set ObjIpIvrWebCom = nothing%> Thanks Ravi

              A 1 Reply Last reply
              0
              • B BlrBoy

                I updated the code as you told but result is same I am giving the code here. Let me know where is the problem <%@ LANGUAGE="VBSCRIPT" %>

                <%Dim ValueRad%> <%ValueRad = Request.Form("RadBtn") Response.Write "ScenarioName = " &ValueRad%> <%Dim ObjIpIvrWebCom%> <%set ObjIpIvrWebCom = Server.CreateObject("IpIvrWebCom.WebCom.1")%> <%Dim retVal%> <%retVal = ObjIpIvrWebCom.GetLogFilePath(ValueRad)%>
                <%retVal = "SampleBanking.txt"%> <%Response.Write "retVal = " &retVal if (retVal <> "") then %>
                Scenario ID <%= ValueRad %>'s file log
                <%End if%>

                <%set ObjIpIvrWebCom = nothing%> Thanks Ravi

                A Offline
                A Offline
                alexey N
                wrote on last edited by
                #7

                If server sends to browser header with request for caching, the meta tag on browser page willbe ignored. For prevent caching you can dtnamically change url of page (for change url you can use sessions). Also you can refresh page immedeatly after load. Best regards, Alexey.

                1 Reply Last reply
                0
                • B BlrBoy

                  Hello All, I am beginner for Web. I want to display content of a file in my page. File is of type TXT and it is present in web root directory. I am developing in ASP and target OS are Windows XP and Windows 2000. I have provided a link to that file in my ASP page. When user clicks the link that file has to be opened. TXT file gets updated with new data frequently and I have to show the latest content of the file. For first time the page is displaying the file content properly. But from then, it is displaying Old content of the file and not updated content of the file. After analyzing I found that the file is getting copied to Temp Internet folder and it is using the file each and every time for displaying. If i delete the file from Temp Internet Folder or rename it it is working fine. If I manually do Refresh also it is displaying updated content. Please let me know how to make ASP page to be reloaded each time and not to take from Temp Internet folder using cookies. Thanks for your time. Ravi

                  V Offline
                  V Offline
                  Vasudevan Deepak Kumar
                  wrote on last edited by
                  #8

                  Ravi, You may try to add the following Cache Control header to your ASP page: Response.CacheControl = "no-cache" Response.AddHeader "Pragma", "no-cache" Response.Expires = -1 (These must be on top of the ASP page before any HTML rendering starts). Also, if you have control of the page that is linking to this ASP page, you can have a link like Textfile.asp where rnd is a random number. The web browser will always think that it is a dynamically created page and would refrain from caching the same. Vasudevan Deepak Kumar Personal Web: http://www.lavanyadeepak.tk/ I Blog At: http://www.dotnetjunkies.com/weblog/deepak/
                  http://deepakvasudevan.blogspot.com/
                  http://deepak.blogdrive.com/

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups