SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict djh's Avatar
    Join Date
    Apr 2000
    Location
    Long Beach, CA
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Refresh every so often

    I have a main page and a pop-up window. Clicking on a link in the main page pops up the other window, where the person can make changes.

    Once they're done making the changes, I want the main page to show it immediately, so that they don't get confused...

    A simple solution, I thought, was to refresh the main page every minutes or so (whenever it's loaded).

    Anyone know how to do this in ASP? Or know of a better solution?

    Thanks folks.

  2. #2
    ********* obeah makeda's Avatar
    Join Date
    Jun 2001
    Location
    rollin' on dubs
    Posts
    492
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think that there are several ways to do this. Since I'm not sure exactly what you're doing, I'm not sure what would work best.

    1. Meta refresh tag. Putting one of these in the head of your code will let you set the refresh rate as well as the URL you want your file to refresh to:

    <meta http-equiv="refresh" content="0;url=default.asp" />

    the number is where you set the time, I believe in minutes, the url part is straightforward. You can have your file refresh to itself, but this can get annoying. I am unsure of browser support issues.

    2. javascript. you could attatch an event handler to the actions in your popup window:

    onclick="parent.location.reload();" ...or something like this

    3. for an asp solution, read up on these:
    response.expires = time (this is the time in minutes before your page expires. )

    Response.Expiresabsolute (lets you specify a specific date time for things to expire)

    Response.AddHeader "pragma", "no-cache" (tells proxy servers not to cache your file)

    Response.CacheControl

    -Makeda


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •