about IExplorer failure

7 views
Skip to first unread message

S. Öztürk

unread,
Sep 9, 2011, 7:46:26 AM9/9/11
to Prototype & script.aculo.us
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?

Walter Lee Davis

unread,
Sep 9, 2011, 9:51:49 AM9/9/11
to prototype-s...@googlegroups.com

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 prototype-s...@googlegroups.com
> .
> To unsubscribe from this group, send email to prototype-scripta...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en
> .
>

Victor

unread,
Sep 15, 2011, 5:34:16 AM9/15/11
to prototype-s...@googlegroups.com
GET requests are idempotent: the side-effects of N > 0 identical requests is the same as for a single request, so from the browser and proxy point of view repeating GET requests should return the same result, and they can instantly use cached previous result.
Reply all
Reply to author
Forward
0 new messages