I’m curious if it’s possible to write data directly to a file on the web server using javascript and without jQuery.
For example, if I have a file on my server named stats.txt, I would like to write data in it if a user clicks a given link.
I looked around everywhere but there’s next to no info about writing data on the server.
You see, I don’t want my users to save the stats file to their computers, because that would be just useless for tracking site statistics.
Also, if there is a different method for tracking statistics, again, without jQuery, I’d like to know.
Fortunately there’s no such method neither in javascript nor in jQuery. This would have been a humongous security threat. But you could use a server side script (PHP, ASP.NET, Java Servlets, …) that will write to the file and then send an AJAX request to this script.