Y T Nuke  
Results 1 to 10 of 10
okay I need to make a page refresh only once after a set time. I ...
  1. #1
    YoutubeSlanger's Avatar
    YoutubeSlanger is offline Junior Member
    Join Date
    Nov 2011
    Posts
    180
    Reputation
    6
    Thanks
    39
    Thanked 17 Times in 16 Posts

    Default how to refresh page only once?

    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. #2
    microbe's Avatar
    microbe is offline Registered Member
    Join Date
    Jan 2012
    Location
    US
    Posts
    62
    Reputation
    11
    Thanks
    22
    Thanked 23 Times in 15 Posts

    Default Re: how to refresh page only once?

    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. #3
    YoutubeSlanger's Avatar
    YoutubeSlanger is offline Junior Member
    Join Date
    Nov 2011
    Posts
    180
    Reputation
    6
    Thanks
    39
    Thanked 17 Times in 16 Posts

    Default Re: how to refresh page only once?

    Quote Originally Posted by microbe View Post
    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>
    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. #4
    Craive is offline Newbies
    Join Date
    Sep 2010
    Posts
    41
    Reputation
    15
    Thanks
    27
    Thanked 8 Times in 4 Posts

    Default Re: how to refresh page only once?

    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.

    if($_GET['REFRESHVAR']<>1)
    {
    header( 'Location: http://www.yoursite.com/new_page.php?REFRESHVAR=1' ) ;}

  5. #5
    RidiculeMe is offline Newbies
    Join Date
    Feb 2012
    Posts
    34
    Reputation
    9
    Thanks
    2
    Thanked 2 Times in 2 Posts

    Default Re: how to refresh page only once?

    Have you tried using imacro? It has a timer which you can set, then run the refresh command, which should only run once.

  6. #6
    pavis is offline Newbies
    Join Date
    Jan 2012
    Location
    In reach of you
    Posts
    24
    Reputation
    10
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: how to refresh page only once?

    what Ridicule me said is right. Have you tried it i macro, it works fine for me. just check out.

  7. The Following User Says Thank You to pavis For This Useful Post:

    RidiculeMe (02-04-2012)

  8. #7
    roxaa is offline Newbies
    Join Date
    Feb 2012
    Posts
    23
    Reputation
    10
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default Re: how to refresh page only once?

    There is also a nice Mozilla addon, which refreshes the page every x seconds.

  9. #8
    procam's Avatar
    procam is online now Regular Member
    Join Date
    Jan 2010
    Location
    Darkness
    Posts
    472
    Reputation
    39
    Thanks
    54
    Thanked 124 Times in 95 Posts

    Default Re: how to refresh page only once?

    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.

  10. #9
    SpmHosting is offline Newbies
    Join Date
    Feb 2012
    Posts
    6
    Reputation
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: how to refresh page only once?

    Quote Originally Posted by roxaa View Post
    There is also a nice Mozilla addon, which refreshes the page every x seconds.
    he wants the to be refreshed only once after it's loaded for the first time.

  11. #10
    Clinker's Avatar
    Clinker is offline Newbies
    Join Date
    Sep 2011
    Posts
    31
    Reputation
    10
    Thanks
    77
    Thanked 5 Times in 5 Posts

    Default Re: how to refresh page only once?

    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 by Clinker; 02-14-2012 at 08:06 PM.

Dot Gov Backlinks Sale


Smarter Submit

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
  •  
  SEnukeX SEO Software
Proudly Powered by Hostwinds.com Web Hosting Click Here For Exclusive BHW Discounts!

Cheap Web Hosting


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76