"Like" counter without PHP? [closed]

0

I've been researching lately on this topic in specific and the truth, I have not come across anything or anything like what I'm looking for, I'm new to server programming, and therefore I'm giving myself the task of make a clean site without PHP for the moment.

To make a system of "Likes" or a click counter that can store or memorize data, it is necessary to use tables and PHP for everything I have seen so far, to store the figures and then call them on sight. My question is, is this possible with Jquery? an example of what you would be looking for:

$(function() {
  var count = 0, countRate = 0, output = $('#output');

  setInterval(function(){ output.html(count) }, 1); // update continually

  $('#click').click(function(){ count += 1 });
  $('#autoClick').click(function(){ countRate += 1 });
});
<script src="https://code.jquery.com/jquery-2.2.3.min.js"></script>

<button id="click">Click</button>
<div id="output">0</div>

Then I can store the result in some way. What has sounded to me most are the cookies, so that according to so many computers click on the image or div, it is added and not destroyed when reloading the page (globally).

I was reading a bit in Stack about this , so I can intuit what to do with what I am questioning, but if I tell you the truth I do not understand much, and not for English, but for the little explanation.

However look at this I have noticed that the likes are saved with cookies because when you delete them, you delete them my like of all the palettes that I have given I like.

    
asked by Dєηyη Crawford 19.06.2017 в 06:22
source

1 answer

1

You must have something clear and that is if you want to store this data on the server, if or if you must use the server language either PHP for Apache, Javascript for node, etc.

If you do not care about the information I like "Something I can not make sense of unless it's a desktop application" you can store using Local Storage so the data is not deleted once you close the browser since persist.

I hope you find it useful, although I think it's your turn to venture into server language.

    
answered by 19.06.2017 в 06:34