btw, if you are trying to track stats, have you looked at Google
Analytics or Piwik?
http://www.google.com/analytics/
http://piwik.org/
Shawn
Ryan White wrote:
Hey All,
So I am having a weird situation when using the $.ajax method. And have
a couple questions regarding this. What I am doing is basically just
using this AJAX call to send a 'pixel' back to my server so I can
collect stats on events. This event fires once every 30 seconds.
$.ajax({
async: false,
type: 'POST',
url: myserver.com/index.gif?id=1&event=e
<http://myserver.com/index.gif?id=1&event=e>
cache: false,
timeout: 0
});
My requests keep coming in as OPTIONS call, instead of POST. Every once
in a while I will get a random rogue GET request that basically mimics
the previous OPTIONS request. The OPTIONS come very 30 seconds. The
rogue GET comes whenever, only seldomly.
1) What is OPTIONS and why would it come out as OPTIONS instead of POST?
2) Why would GET requests come at all? Why would they come randomly
(seemingly) without being called?
3) Is this a proper way of sending a 'pixel' back to my server to track
stats? If not, what is a better way?
Very new to AJAX, and definitely don't know all the internals. Any help
would be greatly appreciated.
Thanks in advance....