"Autorefresh" Feature In The Website.

Recently I noticed an "autorefresh" feature in a website. In this website there is no real time chat or anything. Just simple links to latest news,technical reviews, Technical Q/A & Technology debates.

After every 10 minutes this website refreshes automatically, even we don't hit on "refresh" button.
So, if url is like : #-Link-Snipped-# then it changes something into #-Link-Snipped-# .

This is very nice feature. Anyone knows how it's done ? (this is just for knowledge purpose, I aint developing a website)
This is the first website I have seen with such feature, anyone knows the reason why this feature is not widely used ?

Any idea ? Would like to know about this in detail.

A one more dumb question : In Website like "twitter", the feeds are updated automatically. While in the CE we gotta refresh to see if any update has happened or not. While in the above mentioned website, the feeds are refreshed every 10 minutes. How all these features are added ?
Waiting impatiently to know this. #Curious.

Replies

  • [Prototype]
    [Prototype]
    Twitter and other websites uses AJAX. Refreshing the complete page takes more time which is the motivation behind AJAX. Using AJAX, you can just refresh a part of webpage which actually needs an update instead of refreshing the complete page.

    The mechanism you're talking is pretty old and slow, replaced by the above one. There are many ways of doing it, simplest is using HTML as shown below.



    That "5" basically indicates the time period between refresh, in seconds.
  • Kaustubh Katdare
    Kaustubh Katdare
    A lot of websites do that to increase the pageviews. TimesOfIndia uses slideshows for content so that each new slide adds to an extra pageview.
  • Abhishek Rawal
    Abhishek Rawal
    #-Link-Snipped-# Thanks for information,mate. One more question : Is there any condition for that ? What I mean, is there any criteria required to have such feature, or any website written with any language can add that feature (I mean automatic refresh using AJAX)

    #-Link-Snipped-# Why don't CE have that feature ? Is there any technica lreason behind that ?
  • Kaustubh Katdare
    Kaustubh Katdare
    There's no use in refreshing the page. There are better, modern techniques powered by AJAX. We actually cut-down on the page-refreshes (affected our revenues directly 😕 ). In earlier version of CE, posting a reply would lead to a page refresh. Post a comment on provide would result in a new page refresh.
  • Abhishek Rawal
    Abhishek Rawal
    Kaustubh Katdare
    We actually cut-down on the page-refreshes (affected our revenues directly 😕 )
    How does page-refreshes affects the revenue ? 😨
    Elaborate please.
  • Kaustubh Katdare
    Kaustubh Katdare
    The simple math is more the pageviews, more is the revenue.
  • Anil Jain
    Anil Jain
    AJAX was developed to reduce the server load.
    As you mentioned that you have observed the other website auto refreshes itself after every 10 minutes. I am just assuming that they wants to refresh a particular section of the website (NOT ALL THE CONTENTS), but they choose the rather easier implementation of auto refresh. However their implementation would lead to greater server load and network consumption to user as each refresh request will use network and will request / response from server.

    However in AJAX, this is a technology where screen is divided in frames and sections. Only relevant section of the website is refreshed not all. That will reduce the load.

    In today's world most of the website are using AJAX for development.

    Also the auto -refresh, I believe many wbesites (especially new websites) uses that.

    -CB
  • Neeraj Sharma
    Neeraj Sharma
    I have encountered auto refresh in a lot of company's intranet websites where development or log views take place. Never noticed it in any other website over internet. The sole purpose of auto refresh should be when we are monitoring a progressive activity over a web page, the best example being logs of an operation.
  • Manish Goyal
    Manish Goyal
    I guess node.js can answer your questions, which i believe is preferable to ajax when it comes to real time interaction with servers


    Reason : Say I have a application that loads latest news in a particular section of my website, then if i choose ajax, then what i will do simply make a ajax call after a regular interval of 10 sec (say) and load latest news, but this in turn increases server load

    So here comes the use of node.js, which simply sends information to client side script that something new has been arrived

    In short node.js is something that can communicate with server directly instead of any server side language like php as intermediator

    Thanks
  • micheal john
    micheal john
    Manish Goyal
    I guess node.js can answer your questions, which i believe is preferable to ajax when it comes to real time interaction with servers


    Reason : Say I have a application that loads latest news in a particular section of my website, then if i choose ajax, then what i will do simply make a ajax call after a regular interval of 10 sec (say) and load latest news, but this in turn increases server load

    So here comes the use of node.js, which simply sends information to client side script that something new has been arrived

    In short node.js is something that can communicate with server directly instead of any server side language like php as intermediator

    Thanks
    Hi @#-Link-Snipped-# , i'm new to node.js can you refer any source or books for learning node.js please.
  • Manish Goyal
    Manish Goyal
    Truly speaking I never learn anything from books

    Just Google about node.js tutorials, there you will find a number of tutorials

    Also while reading tutorials

    Try to implement steps practically, that will give you a more clear idea of node.js

    2: You must have basic knowledge of ajax while learning node.js

    If you have any specific query while implementing it, feel free to ask

    Thanks
  • Nirmal Parwate
    Nirmal Parwate
    A simple way to do auto-refresh would be using a setTimeout function which calls another function which makes an ajax call and on success of that ajax call, the response can be used to refresh any particular DOM element in the page. At the end of the you called function you can call your first function again which makes it recurring. In the following example you just have to call time and it will work till it calls itself 10 times.

    Example:
    function time(i) {
        setTimeout (
            function() {
                console.log('abc '+i);
                if(i<10) {
                    time(++i);
                } else {
                    console.log('finished recurring function');
                }
            }, 1000);
    }
    
    time(0);
  • Nirmal Parwate
    Nirmal Parwate
    This note is to the admin/developer of CE you should provide edit functionality to the person who wrote a reply...
  • Kaustubh Katdare
    Kaustubh Katdare
    Nirmal Parwate
    This note is to the admin/developer of CE you should provide edit functionality to the person who wrote a reply...
    The new registrations aren't allowed to edit their posts for a reason - they would register, make a regular post, log-in after a few days and add spammy links to their posts.

    PS: You should see the permissions on your account pretty soon.
  • Nirmal Parwate
    Nirmal Parwate
    Kaustubh Katdare
    The new registrations aren't allowed to edit their posts for a reason - they would register, make a regular post, log-in after a few days and add spammy links to their posts.

    PS: You should see the permissions on your account pretty soon.
    Okies, i'll check that.. Thanks
  • Nirmal Parwate
    Nirmal Parwate
    Does an AJAX call affects revenues or it happens only on page refresh??
  • Kaustubh Katdare
    Kaustubh Katdare
    Nirmal Parwate
    Does an AJAX call affects revenues or it happens only on page refresh??
    Yes it does; for the ads that rely on pageviews.
  • simplycoder
    simplycoder
    SignalR is also amazing in this context.
    One might take a look #-Link-Snipped-#
  • Agha Abdul Rahman
    Agha Abdul Rahman
    Abhishek Rawal
    Recently I noticed an "autorefresh" feature in a website.
    Great ! thanx bro, you have solved some problems.
  • avii
    avii
    so much wrong info being shared here. Twitter or any top site like Facebook, does not use AJAX or timeout refreshes. They use web sockets. For HTML5, Push API is being 'pushed'.

    DON'T USE AJAX FOR THIS KINDA SHIT. THAT'S JUST HORRIBLY WRONG.

You are reading an archived discussion.

Related Posts

My doubt is related to KICK START bikes: Why do some bikes gets started though they are not in neutral (Eg. Yamaha) and why do some bikes should be brought...
Everyone knows that one person in office or at the university who gets restless when the quick smoke break is denied. However hard they try, they just can't quit smoking....
Have you every seen Pics of Jaguar D-Type or E-Type? After the success of predecessor Jaguar is all set to launch Jaguar F-Type and probably a Indian launch in coming...
I want an impartial review of ISB Hyderabad. If you have any idea, kindly share with me. What type of institute is it? I have heard it is not approved...
My computer is having a strange problem. It has Windows 7 64 bit, and everything was working fine till yesterday. I have two accounts : one Admin account and other...