force browser refresh

asp , db United States
  • 15 years ago

    Hi all,
    Coul any one express me some code that force browser refresh from server.Say I am trying to develope asp page
    and retrieve database from server.and I want to force browser to refresh when new record is added at a server.
    if no new record the browser not refresh.


    Sorry for my english.


    Thanks.

  • 15 years ago

    You could check out http://www.developerfusion.com/show/1160/ ... that will ensure that any pages being served without being cached...

  • 15 years ago
    Have you tried using response.redirect "currentPage.asp"?
  • 13 years ago

    Did anyone ever resolve this issue? I am having a very similar issue right now.

     I have a web application that connects to a database backend. There are two users that use this application within the same room, but from different PCs. When one person saves a record into the database, it will not show on the other person's version of the page until they refresh their browser. It seems kind of silly for them to have to yell back and forth to hit rehresh after one of them saves a record.

    I came up with a concept to have a table that stores the date/time from the last time a record was saved in the database. Also within this table would be the PC name of anyone that has connected recently, and the last date/time a refresh was forced. A process could check this table every 5 or 10 seconds and if it sees that there is a record more recent than the last time a refresh was forced, it could force the refresh.

     I have not been able to find any to make this happen though since there does not seem to be any way to force the refresh through code.

  • 13 years ago

    try this tag in the <head> section of your html page

     

    <META http-equiv="Refresh" content="10"> (for10 secondes)

     

    serval

  • 13 years ago

    Thanks for the suggestion. That is a much simpler solution that I was thinking, although I am not quite sure it will fully resolve the issue. i will give it a go though.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Never trust a programmer in a suit.” - Anonymous