-1

How can I display the same time on another page without using cookies because its just a local website and database isn't such a good idea? Is there something else I can do?

1 Answers1

1

local storage should be very ok. http://www.alsacreations.com/xmedia/doc/full/web-storage.jpg

example :

    //page A
var counted_time=[your algorithm result];
    localStorage.setItem("mytime_hey", counted_time);

    //page B
        var mytime = localStorage.mytime_hey; 
    $("#mydiv").html("your time is"+mytime+" !");

//// if your question is : how to count ? that s another matter. make a difference between 2 date : How Many Seconds Between Two Dates?

Community
  • 1
  • 1
3pic
  • 1,188
  • 8
  • 26
  • I don't need it as a particular time actually the time is being counted and then I want to show the user that how much time it took him to complete my questions in another link –  Jun 08 '15 at 13:18
  • allright. my code does. setItem("whatyouwant", what_var_u_want); ... see my edit – 3pic Jun 08 '15 at 13:20