ASP page always displays Old File content.
-
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
-
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
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; }
-
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
-
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
-
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
-
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
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.
-
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
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/