PDA

View Full Version : javascript related?



student101
11-07-2009, 11:13 AM
I've just read what javascript can't do, but could it assist with my query?

My goal is to track all the links and images clicked, viewed and downloaded.

I noticed on this forum there is an option to upload files and images,
next to the file/image reads (10.9 KB, 1 views)

Can javascript do this, if yes what is it called? so that I can research and impletement such a system.

Any help here would be great!

jscheuer1
11-07-2009, 11:23 AM
No, javascript cannot keep track of anything like that. For something like that you need the server. Javascript could though theoretically be used via AJAX or some other client/server interface to allow for quicker updates of this sort of information to the page.

In this particular case though, I believe it is all done on the server side. Like if you view the file, the number of views doesn't update until after the page is reloaded, right? If so, it's all on the server side - in this case probably mediated via PHP and a database as a part of the vBulletin forum package.

student101
11-07-2009, 11:27 AM
Cool, so it's safer to go with an ajax and php link/image tracking type system.

Thanks for the clarity!

jscheuer1
11-07-2009, 02:50 PM
Cool, so it's safer to go with an ajax and php link/image tracking type system.

I said nothing about safety. Anytime you expose the server to client side scripting there is always at least some potential for someone to gain some control over the server. Security issues around that interface should be considered.