1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to refresh page only once?

Discussion in 'Cloaking and Content Generators' started by YoutubeSlanger, Feb 2, 2012.

  1. YoutubeSlanger

    YoutubeSlanger Junior Member

    Joined:
    Nov 9, 2011
    Messages:
    184
    Likes Received:
    22
    okay I need to make a page refresh only once after a set time. I cant find a script for this just scripts that refresh every x amount of time.
     
  2. microbe

    microbe Registered Member

    Joined:
    Jan 25, 2012
    Messages:
    61
    Likes Received:
    24
    Occupation:
    I sit behind a computer screen and move my hands..
    Location:
    US
    Couldn't you just use a simple JS/meta refresh?
    Code:
    <script>
      ESPN_refresh=window.setTimeout(function(){window.location.href=window.location.href},900000);
    </script>
    <noscript>
      <meta http-equiv="refresh" content="900" />
    </noscript>
     
  3. YoutubeSlanger

    YoutubeSlanger Junior Member

    Joined:
    Nov 9, 2011
    Messages:
    184
    Likes Received:
    22
    you didnt read my post, I don't need it to refresh over and over again I need it to only fire off once and never again
     
  4. Craive

    Craive Newbie

    Joined:
    Sep 29, 2010
    Messages:
    46
    Likes Received:
    10
    Depending on you site, you could use a server side refresh where you use an if statement to keep it from refreshing. This way once the page is called it should refresh and send that variable through to keep it from refreshing again.

     
  5. RidiculeMe

    RidiculeMe Newbie

    Joined:
    Feb 4, 2012
    Messages:
    34
    Likes Received:
    2
    Have you tried using imacro? It has a timer which you can set, then run the refresh command, which should only run once.
     
  6. pavis

    pavis Newbie

    Joined:
    Jan 15, 2012
    Messages:
    24
    Likes Received:
    1
    Location:
    In reach of you
    what Ridicule me said is right. Have you tried it i macro, it works fine for me. just check out.
     
    • Thanks Thanks x 1
  7. roxaa

    roxaa Newbie

    Joined:
    Feb 5, 2012
    Messages:
    23
    Likes Received:
    1
    There is also a nice Mozilla addon, which refreshes the page every x seconds.
     
  8. procam

    procam Senior Member

    Joined:
    Jan 5, 2010
    Messages:
    879
    Likes Received:
    325
    Occupation:
    Webmaster, Big Data Scrappin
    Location:
    'lynx -listonly -dump url.yourcrappysite.com'
    If your using wordpress you could use Quick Page/Post Redirect plugin. But I don't think your using WP. I hope you find your answer.
     
  9. SpmHosting

    SpmHosting Newbie

    Joined:
    Feb 9, 2012
    Messages:
    6
    Likes Received:
    0
    he wants the to be refreshed only once after it's loaded for the first time.
     
  10. Clinker

    Clinker Newbie

    Joined:
    Sep 29, 2011
    Messages:
    31
    Likes Received:
    4
    If you don't have the option to fiddle with php, I've created a simple HTML example that works client side:

    http://jsfiddle.net/WrPkd/7/

    You just need jquery cookie and that's it;
    you set the cookie RELOADED just after the first refresh and then you have to test its value; if RELOADED is set, the page is not refreshed.
    I've binded this js function to a button, but you could easily trigger it when the page is loaded or after a given time.

    Code:
    $('#something').click(function() {
      if ($.cookie("RELOADED") == null){
       $.cookie("RELOADED",1);
       alert("I'm refreshing!");   
       location.reload();
      }else{
       alert("Don't refresh!");
      }
    });
     
    Last edited: Feb 14, 2012