1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Getting Users to Refresh your Web Page

Discussion in 'HTML & Website Design' started by misohoni, Jul 27, 2004.

  1. #1
    What I mean is that users are going to my site but not refreshing the page so see new content. Is there some special tag I can implement on my page?
    SEMrush
     
    misohoni, Jul 27, 2004 IP
    SEMrush
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,277
    Likes Received:
    2,597
    Best Answers:
    460
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    This should do it...

    <META HTTP-EQUIV="REFRESH" CONTENT="30; URL=http://www.digitalpoint.com/">
    Code (markup):
    That will refresh to the URL listed after 30 seconds.
     
    digitalpoint, Jul 27, 2004 IP
  3. mopacfan

    mopacfan Peon

    Messages:
    3,273
    Likes Received:
    164
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Won't that refresh the page every 30 seconds? I don't know of any way to refresh the page just once.
     
    mopacfan, Jul 28, 2004 IP
  4. TwisterMc

    TwisterMc Mac Guru

    Messages:
    972
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You need to find a tag that doesn't allow the page to be cached. Is it just HTML? Or PHP? Or what?
     
    TwisterMc, Jul 28, 2004 IP
  5. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,220
    Likes Received:
    778
    Best Answers:
    0
    Trophy Points:
    0
    #5
    The CONTENT="30; URL=http://www.digitalpoint.com/"> bit never made sense to me. Why not like all tags and parameters two quotes (or none) as oppose to the ; :S

    Anyway, that is one way of doing it.

    There is indeed a no cache option too but dunno the code.
     
    T0PS3O, Jul 28, 2004 IP
  6. mopacfan

    mopacfan Peon

    Messages:
    3,273
    Likes Received:
    164
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I believe it's pragma-nocache or something like that.
     
    mopacfan, Jul 28, 2004 IP
  7. misohoni

    misohoni Notable Member

    Messages:
    1,717
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    200
    #7
    yep the 30 second refresh is an ok idea, but will cause alot of bandwidth usuage and annoyance to the readers.

    I heard of the nocache also, can't remember the exact code. Will that help though, since the site that's on their computers is the cached version. It's difficult to explain, but I'd like to just create a one-time huge refresh which updates the cache on their pc.
     
    misohoni, Jul 28, 2004 IP
  8. TwisterMc

    TwisterMc Mac Guru

    Messages:
    972
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
  9. misohoni

    misohoni Notable Member

    Messages:
    1,717
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    200
    #9
    woah, it's here - <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="-1">

    Thanks guys, hope this is some use to others too...
     
    misohoni, Jul 28, 2004 IP
  10. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,220
    Likes Received:
    778
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Isn't your site database driven? That should pull out fresh content each time.
     
    T0PS3O, Jul 28, 2004 IP
  11. Joel Naten

    Joel Naten Guest

    Messages:
    83
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    It actually works best if you use use the HTTP directives instead of HTML. Browsers don't always seem to respect what's in the HTML, but they seem to pay attention to the HTTP directives.
     
    Joel Naten, Jul 28, 2004 IP
  12. Owlcroft

    Owlcroft Peon

    Messages:
    645
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    0
    #12
    You also need to take care to see that you are addressing both HTTP 1.0 and HTTP 1.1.

    In PHP, for example:
      //     HTTP/1.1
      header("Cache-Control: no-cache");
    
      //     HTTP/1.0
      header("Pragma: no-cache");
    PHP:
    HTTP 1.1 will always honor that directive; HTTP 1.0 will usually, but it cannot be guaranteed.

    (Note that if you are actually using PHP to send those headers, you need to take the standard PHP cautions about headers, to make sure that they truly get sent--check the PHP manual for detail, but in brief, you need those statements before either the HTML or the PHP outputs anything (else the headers are already on their way by the time you try to add to them).
     
    Owlcroft, Jul 28, 2004 IP