On Sep 9, 2011, at 7:46 AM, S. Öztürk wrote:

i used this cosdes

<script type="text/javascript" src="js/prototype.js"></script><script
type="text/javascript"> new Ajax.PeriodicalUpdater('clock',
'clock.php', {   method: 'GET',   frequency: 1 });</script>

when i change codes to

<script type="text/javascript" src="js/prototype.js"></script><script
type="text/javascript"> new Ajax.PeriodicalUpdater('clock',
'clock.php', {   method: 'POST',   frequency: 1 });</script>

it was work...

but i dont understand what is that failure's source , why dosen't work
in GET method ?

Can u answer me?

I am guessing that your server is returning cached info on every request after the initial one, up to whatever default limit is compiled into your copy of Apache. Post requests are inherently non- cacheable, so you weren't seeing that result there. Even though you aren't sending any post data in your parameters hash, your request is going over the post "channel" so the server always returns an unique response. You could use Get if you also include some token, like the current time in microseconds, in the parameters of your request.

        {parameters:{foo: (new Date().getTime())}}

Hope this helps,

Walter


--
You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to [email protected] . To unsubscribe from this group, send email to [email protected] . For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en .


--
You received this message because you are subscribed to the Google Groups "Prototype 
& script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to