Search for:
Jump to: 
Your Ad Here
Author Message
 Post subject: Checking number of visitors to a page using HTML5
PostPosted: Sat Sep 17, 2011 6:46 am 
Offline

Joined: Mon Nov 12, 2007 10:12 am
Posts: 355
Hi friends,

The below code helps to find the number of visitors to a web page using localstorage in HTML5.

<!-- firefox does't not suport localeStorage,Check this application in opera or crome. -->
<!DOCTYPE HTML>
<html>
<body>
<script type="text/javascript">
if (localStorage.pagecount) {
localStorage.pagecount=Number(localStorage.pagecount) +1;
}else{
localStorage.pagecount=1;
}
document.write("Visits: " + localStorage.pagecount + " time(s).");
</script>
<p>Refresh the page to see the counter increase.</p>
<p>Close the browser window, and try again, and the counter will continue.</p>
</body>
</html>


Top
  
 
 Post subject: Re: Checking number of visitors to a page using HTML5
PostPosted: Wed Aug 01, 2012 5:20 am 
Offline

Joined: Mon Jul 30, 2012 6:07 am
Posts: 5
It is really an awesome code to track any website's page visitors which is probably not easy to do, i like your way of sharing and no doubt that we are here on forum to share ideas and knowledge.

_________________
customized logo design
logo designing


Top
  
 
 Post subject: Re: Checking number of visitors to a page using HTML5
PostPosted: Mon Nov 05, 2012 9:37 am 
Offline

Joined: Mon Nov 05, 2012 5:56 am
Posts: 8
You have given a brilliant code for the how to find the number of visitors to a web page. It is very helpful to everyone and it will give the new ideas of web developer. Thanks for nice coding information.

_________________
php web application development | PHP development | php mysql development | cakephp developers


Top
  
 
   [ 3 posts ] 

1, 2, 3, 4, 5 ... 413
Recent topics  Replies   Views   Last post 
No new posts Benefits of PHP

by hirephpexpert » Fri Sep 07, 2012 4:41 am in CakePHP

6

1546

Wed May 15, 2013 6:25 am

PrettyPrincesG View the latest post

No new posts How to stop user from getting registered in Joomla

by mallikharjuna rao » Tue Jan 22, 2013 5:16 am in Joomla

3

1383

Wed May 15, 2013 6:17 am

PrettyPrincesG View the latest post

No new posts How to write a query in social engine

by fathima_sony » Tue Sep 06, 2011 12:34 pm in Others

2

1742

Tue May 14, 2013 12:09 pm

sanath123 View the latest post

No new posts CCavenue integration in php

by rajkumar » Fri Mar 04, 2011 3:34 am in Payment Gateways

2

8171

Tue Apr 30, 2013 5:48 am

sagarpatil0710 View the latest post

No new posts How to search for decimal values in post meta using WP_Query

by jimmybrion » Mon Apr 29, 2013 11:56 am in Others(phpBB, phpfox, etc..)

0

1655

Mon Apr 29, 2013 11:56 am

jimmybrion View the latest post


Your Ad Here