Auto Refresh code?
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 16

Thread: Auto Refresh code?

  1. #1
    Registered User disarm's Avatar
    Join Date
    Oct 2001
    Location
    Southern Indiana
    Posts
    99

    Post Auto Refresh code?

    Does anyone know if there is any html code that allows you to refresh the page after a set number of seconds?

  2. #2
    Registered User
    Join Date
    Jun 1999
    Location
    Florida, USA
    Posts
    436

    Post

    < META HTTP-EQUIV=Refresh CONTENT="10; URL=http://www.sitename.com/" >

    This will reload <a href="http://www.sitename.com" target="_blank">http://www.sitename.com</a> after ten seconds. Not all browsers will support this though. Some search engines also do like this.
    Tech Handbook Filling your computer needs.

  3. #3
    Registered User disarm's Avatar
    Join Date
    Oct 2001
    Location
    Southern Indiana
    Posts
    99

    Post

    Thanks...There should be another " after 10 right?

  4. #4
    Registered User ScottieM3's Avatar
    Join Date
    Mar 2001
    Location
    NJ
    Posts
    202

    Talking

    Here is another way to do it.. browsers also like this way better

    just put this in your head..

    &lt;script language="Javascript"&gt;
    setTimeout('document.location.reload(true)', 1000);
    &lt;/script&gt;

    this script will refresh the page every second
    The "1" in "1000" represents "1" second, just change that number to lengthen the refresh wait.
    Spend One Hour of Every Day Like it was Your last, you'll Live much better that way

  5. #5
    Registered User
    Join Date
    Jun 1999
    Location
    Florida, USA
    Posts
    436

    Post

    [quote]Originally posted by disarm:
    <strong>Thanks...There should be another " after 10 right?</strong><hr></blockquote>

    The quote at the end of the url closes the 10.
    Tech Handbook Filling your computer needs.

  6. #6
    Registered User disarm's Avatar
    Join Date
    Oct 2001
    Location
    Southern Indiana
    Posts
    99

    Post

    yeah i know. You left it off in your post. I was just double checking as its been a couple years since I last wrote any html code. A friend needed some help so i told him i'd find the answer...thanks by the way

  7. #7
    Registered User
    Join Date
    Jan 1999
    Location
    London, Great Britain
    Posts
    300

    Exclamation

    [quote]Originally posted by ScottieM3:
    Here is another way to do it.. browsers also like this way better<hr></blockquote>

    Hmm ... no, not really.

    You're using JavaScript which not all browsers support (or have enabled) whereas using the META equivalent method is part of the HTML standards which all browsers should support.

    HTH,
    I'd rather die peacefully in my sleep like my Grandfather,
    than screaming in terror like his passengers.
    Jim Harkins
    <a href="http://www.Horrible.Demon.co.uk/" target="_blank">http://www.Horrible.Demon.co.uk/</a>

  8. #8
    Registered User ScottieM3's Avatar
    Join Date
    Mar 2001
    Location
    NJ
    Posts
    202

    Post

    [quote]Originally posted by antonye:
    <strong>

    Hmm ... no, not really.

    You're using JavaScript which not all browsers support (or have enabled) whereas using the META equivalent method is part of the HTML standards which all browsers should support.

    HTH,</strong><hr></blockquote>

    Actually your wrong.. not all browsers support meta refresh, meta refresh also screw up your browsers history, and some search engines will actually ignore your page if you have a meta refresh.
    All current browsers Support Javascript and javascript Support is growing. If your browser doesn't support Javascript or you have it disabled than your missing about 95% of the web.
    It does not necesarily matter which way you do it, unless you want the page to be at the top of Search Engines
    Spend One Hour of Every Day Like it was Your last, you'll Live much better that way

  9. #9
    Registered User WebHead's Avatar
    Join Date
    Oct 2000
    Posts
    8,208

    Post

    My personal preference is definately javascript. But Meta tags are cool too. I guess everyone just has their own preference.
    Hello World

  10. #10
    Registered User
    Join Date
    Jan 1999
    Location
    London, Great Britain
    Posts
    300

    Post

    [quote]Originally posted by ScottieM3:
    Actually your wrong..
    <hr></blockquote>

    Whatever.

    If a browser is complaint under the W3c specifications for HTML then it should support META tags.

    [quote]meta refresh also screw up your browsers history<hr></blockquote>

    Never seen this happen. Would you like to give us an example?

    [quote]and some search engines will actually ignore your page if you have a meta refresh.<hr></blockquote>

    Never seen this happen either and I've been writing web sites for over 6 years now, and that's in a professional capacity - as in it's my job that I get paid a lot of money to do, not just something I do at the weekend in my spare time.

    [quote]
    All current browsers Support Javascript and javascript Support is growing. If your browser doesn't support Javascript or you have it disabled than your missing about 95% of the web.
    <hr></blockquote>

    Not all browsers support JavaScript. Lynx is one and is just as valid as any other browser. WebTV also doesn't like JavaScript, nor do most of the Digital TV browsers used here in the UK.

    A few major financial institutions I have worked for also disable java and javascript support (some filter it at the proxy) so again a browser may support it but may not actually do anything with it.

    The disabling of java and javascript is actually becoming *more* popular in industry as the web is accepted as a business tool but the security fears and known malicious code attacks mean that there is increased risk by allowing client side script.

    [quote]
    It does not necesarily matter which way you do it,<hr></blockquote>

    True, but it depends which specification you want to write your web sites to and how compliant you want to be. If your target audience is nothing more than a bunch of kids collecting Pokemon codes then I'm sure it's nothing to worry about.

    [quote]unless you want the page to be at the top of Search Engines<hr></blockquote>

    Again, I've never heard this but then I don't write major web site search engines. I take it you do or have insider knowledge as to how Google or similar sites index their pages?

    I've never had any trouble having sites indexed, but then there's plenty of other ways to increase your score in search engines.

    Just putting across my opinion that if you're going to do something, you should understand why you are doing it and what implications it has.

    HTH,
    I'd rather die peacefully in my sleep like my Grandfather,
    than screaming in terror like his passengers.
    Jim Harkins
    <a href="http://www.Horrible.Demon.co.uk/" target="_blank">http://www.Horrible.Demon.co.uk/</a>

  11. #11
    Registered User ScottieM3's Avatar
    Join Date
    Mar 2001
    Location
    NJ
    Posts
    202

    Angry

    [quote]Replying to antonye:
    <strong>&nbsp;</strong>
    <hr></blockquote>

    meta refresh also screw up your browsers history
    Meta refreshes are also used as redirects, therefore causing the browser to add the Redirecting page to the browser history, Javascript redirection does not.


    some search engines will actually ignore your page if you have a meta refresh
    When a Search engine spiders a site it will follow the link in the meta refresh tag, if you have 6 URL's all meta refreshing to the same site, this is a great way to move your listings up in the search, therefore many spiders (search engine crawlers) consider meta refresh to be a spamming tool, therefore ignoring the site.


    Now to lay the smac down

    [quote]Originally posted by antonye:
    <strong>I've been writing web sites for over 6 years now, and that's in a professional capacity - as in it's my job that I get paid a lot of money to do, not just something I do at the weekend in my spare time</strong>
    <hr></blockquote>
    At no point in my past posts did i question your ability or insult your profession!
    But since we are on the topic, I am Currently and have been for almost 3 years a Webmaster for
    <a href="http://www.earthcam.com" target="_blank">http://www.earthcam.com</a>
    <a href="http://tv.earthcam.com" target="_blank">http://tv.earthcam.com</a>
    and <a href="http://www.webcamstore.com" target="_blank">http://www.webcamstore.com</a>
    Before that i was a Developer for 2 years at <a href="http://www.dialogic.com" target="_blank">http://www.dialogic.com</a>
    aside from that i have been developing web pages as a professional carreer for 7 years, and make a nice chunk of change
    Aside from all that I also have a Degree in Engineering, Hold the professional position of Network Engineer, and on a smaller note have MCSE, CNA, A+.

    [quote]Originally posted by antonye:
    <strong>If your target audience is nothing more than a bunch of kids collecting Pokemon codes then I'm sure it's nothing to worry about.</strong><hr></blockquote>
    Get <a href="http://www.alexa.com/" target="_blank">Alexa</a> (which is a site rating system) and look at the sites I've listed above, and check out the rankings and clicks. My audience is about 1 million+ users per day, also go to popular search engines and do searches on common words like "webcam" or "times square", one of the above sites will almost definetly be on the first page of results if not in the top 5 or number one slot.

    your credentials do not impress me and neither does your knowledge..

    if you don;t want to look stupid than don't act stupid!
    Spend One Hour of Every Day Like it was Your last, you'll Live much better that way

  12. #12
    Registered User disarm's Avatar
    Join Date
    Oct 2001
    Location
    Southern Indiana
    Posts
    99

    Post

    Scottie, You mentioned something about Meta redirects? This is something I'm interested in knowing. how do you get a page to redirect to another page.
    We are doing a PC inventory Page. When we click the submit button we can get it to update the database with VB script..but the page is blank..after it submits we want it to redirect back to the edit page. Do you get what im saying?

  13. #13
    Registered User
    Join Date
    Sep 2000
    Posts
    1,965

    Post

    The Argument Stops now! Any more flaming will not be tolerated

  14. #14
    Registered User WebHead's Avatar
    Join Date
    Oct 2000
    Posts
    8,208

    Post

    I don't really see what the argument is all about. There's always more than one way to do something in the computer business. I mean if I want to copy something, I could hit ctrl-v or click edit>copy. Some people like Dreamweaver and some like FrontPage. And then there's others who like doing it the hard way with Notepad. Personal preference doesn't make it wrong or right. So just chill out everyone,... it's all good in the neighborhood.
    Hello World

  15. #15
    Registered User ScottieM3's Avatar
    Join Date
    Mar 2001
    Location
    NJ
    Posts
    202

    Post

    [quote]Originally posted by disarm:
    <strong>Scottie, You mentioned something about Meta redirects? This is something I'm interested in knowing. how do you get a page to redirect to another page.
    We are doing a PC inventory Page. When we click the submit button we can get it to update the database with VB script..but the page is blank..after it submits we want it to redirect back to the edit page. Do you get what im saying?</strong><hr></blockquote>

    The code above on Danrak's post is a meta redirect
    example:

    &lt;meta http-equiv="refresh" content="10; URL=http://www.redirectaddress.com"&gt;

    the "content" is the seconds to wait before refreshing.


    Or you could do this with Javascript:
    Example:

    &lt;script language="Javascript"&gt;
    setTimeout(location.href = "http://www.redirectaddress.com", 1000);
    &lt;/script&gt;


    the "1000" equals 1 second, change this to extend the wait

    Sorry SherifQ

    Right on WebHead
    Spend One Hour of Every Day Like it was Your last, you'll Live much better that way

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
  •