nevyana2006
asked on
Auto refresh Image
Hello,
I am using an ASP script which reads the contents of a folder with image files and outputs its content to the client. I am trying to make it auto refresh but it only works if the refresh is requested from the browser. I have added the following content, but does not work. Since the client is getting a HTML response, I have added a refresh meta tag (<META HTTP-EQUIV=refresh CONTENT=10;URL=http://webphone.nsgtmo.com/photopage.asp>) which seems to reload the page but does not re-run the code.
Response.Expires = -1
REsponse.ExpiresAbsolute = Now() -2
Response.AddHeader "Pragma", "no-cache"
Response.AddHeader "cache-control","Private"
Response.CacheControl = "private"
Response.AddHeader "Refresh", "10;URL=http://webphone.nsgtmo.com/photopage.asp"
I am using an ASP script which reads the contents of a folder with image files and outputs its content to the client. I am trying to make it auto refresh but it only works if the refresh is requested from the browser. I have added the following content, but does not work. Since the client is getting a HTML response, I have added a refresh meta tag (<META HTTP-EQUIV=refresh CONTENT=10;URL=http://webphone.nsgtmo.com/photopage.asp>) which seems to reload the page but does not re-run the code.
Response.Expires = -1
REsponse.ExpiresAbsolute = Now() -2
Response.AddHeader "Pragma", "no-cache"
Response.AddHeader "cache-control","Private"
Response.CacheControl = "private"
Response.AddHeader "Refresh", "10;URL=http://webphone.nsgtmo.com/photopage.asp"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes, you are right. If I installed an add-on to the IE browser and set it up to reload the page it will reload it and display the updated images in the folder to the client. I added (found this on another problem) a javascript code <script>setTimeout('locati on.reload( )',60000); </script> in the HTML response and that enabled the reload on the clients IE browser without an add-on. This is strange as ASP is native to IE....
That will only work if the image doesn't have an expiration value set in the header. If it does the refresh will NOT download a new image.
Let me know how this helps or if you have a question.
bol