RE: [flexcoders] Re: HTTPService multiple requests not being sent?
Injecting a current client-side timestamp into an outbound request is a good way to avoid Http response caching if you don't control the server. If you do control the server, you should consider configuring it to set HTTP no-cache headers in these responses to suppress caching. Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of valdhor Sent: Tuesday, May 27, 2008 9:15 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: HTTPService multiple requests not being sent? This is pretty close to another qustion that was asked lately. Seth Hodgson summed up what was going on here: http://tech.groups.yahoo.com/group/flexcoders/message/113808 --- In flexcoders@yahoogroups.com, "javadmanx" <[EMAIL PROTECTED]> wrote: > > I have the following service: > > getStudentById.send({action: 'student_by_id', id: > event.currentTarget.selectedItem.id}); > > If I make multiple requests on this same service with the same values > it seems to cache and not send the request to the server again. The > only way I've found to stop it from doing this is to add a time stamp > the changes the request values. Below is the code I've used to get it > to send the request on every call. So what it does is, if the request > values are the same it just gives me the same data, but never calls > the server. But if I use this below it calls the server every time. > > getStudentById.send({action: 'student_by_id', id: > event.currentTarget.selectedItem.id, tt: new Date().getTime()}); > > What am I doing, and is there a better way to get all requests to call > the server even if the request values are the same? Thanks. >
RE: [flexcoders] Re: HTTPService multiple requests not being sent?
I have "heard" that POSTed requests do not cache. I use POST exclusively, and have never had any caching issues. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Seth Hodgson Sent: Tuesday, May 27, 2008 2:38 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: HTTPService multiple requests not being sent? Injecting a current client-side timestamp into an outbound request is a good way to avoid Http response caching if you don't control the server. If you do control the server, you should consider configuring it to set HTTP no-cache headers in these responses to suppress caching. Seth From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ] On Behalf Of valdhor Sent: Tuesday, May 27, 2008 9:15 AM To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> Subject: [flexcoders] Re: HTTPService multiple requests not being sent? This is pretty close to another qustion that was asked lately. Seth Hodgson summed up what was going on here: http://tech.groups.yahoo.com/group/flexcoders/message/113808 <http://tech.groups.yahoo.com/group/flexcoders/message/113808> --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "javadmanx" <[EMAIL PROTECTED]> wrote: > > I have the following service: > > getStudentById.send({action: 'student_by_id', id: > event.currentTarget.selectedItem.id}); > > If I make multiple requests on this same service with the same values > it seems to cache and not send the request to the server again. The > only way I've found to stop it from doing this is to add a time stamp > the changes the request values. Below is the code I've used to get it > to send the request on every call. So what it does is, if the request > values are the same it just gives me the same data, but never calls > the server. But if I use this below it calls the server every time. > > getStudentById.send({action: 'student_by_id', id: > event.currentTarget.selectedItem.id, tt: new Date().getTime()}); > > What am I doing, and is there a better way to get all requests to call > the server even if the request values are the same? Thanks. >
Re: [flexcoders] Re: HTTPService multiple requests not being sent?
If you're GET requesting a URL that points to dynamic content that changes with every request, whoever is in charge of the server really should be setting no-cache, and they'd probably appreciate being notified of what is in effect a bug in the service. Adding a timestamp get parameter just smells like we're back in the 90s doing PHP :D -J On Wed, May 28, 2008 at 5:05 AM, Tracy Spratt <[EMAIL PROTECTED]> wrote: >I have "heard" that POSTed requests do not cache. I use POST > exclusively, and have never had any caching issues. > > Tracy > > > -- > > *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On > Behalf Of *Seth Hodgson > *Sent:* Tuesday, May 27, 2008 2:38 PM > *To:* flexcoders@yahoogroups.com > *Subject:* RE: [flexcoders] Re: HTTPService multiple requests not being > sent? > > > > Injecting a current client-side timestamp into an outbound request is a > good way to avoid Http response caching if you don't control the server. > If you do control the server, you should consider configuring it to set > HTTP no-cache headers in these responses to suppress caching. > > Seth > > From: flexcoders@yahoogroups.com [mailto: > flexcoders@yahoogroups.com ] On Behalf Of > valdhor > Sent: Tuesday, May 27, 2008 9:15 AM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Re: HTTPService multiple requests not being sent? > > This is pretty close to another qustion that was asked lately. Seth > Hodgson summed up what was going on here: > > http://tech.groups.yahoo.com/group/flexcoders/message/113808 > > --- In flexcoders@yahoogroups.com , > "javadmanx" <[EMAIL PROTECTED]> wrote: > > > > I have the following service: > > > > getStudentById.send({action: 'student_by_id', id: > > event.currentTarget.selectedItem.id}); > > > > If I make multiple requests on this same service with the same values > > it seems to cache and not send the request to the server again. The > > only way I've found to stop it from doing this is to add a time stamp > > the changes the request values. Below is the code I've used to get it > > to send the request on every call. So what it does is, if the request > > values are the same it just gives me the same data, but never calls > > the server. But if I use this below it calls the server every time. > > > > getStudentById.send({action: 'student_by_id', id: > > event.currentTarget.selectedItem.id, tt: new Date().getTime()}); > > > > What am I doing, and is there a better way to get all requests to call > > the server even if the request values are the same? Thanks. > > > > > -- "Therefore, send not to know For whom the bell tolls. It tolls for thee." :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
Re: [flexcoders] Re: HTTPService multiple requests not being sent?
I do have control of the server and I'm using GET requests. I've also done the setting headers. None of that did any thing. I am sending requests to a single Servlet. I've setup a message to print in the log if any request comes in and it shows the client never made a request. I think this is truely the client caching. I'll try the post method, but I think I did that, not sure. However like I said I created the Servlet and it's not getting any hit from the client at all. It's like the client just looks at the request params and sends the last requests data, if the params match. I'm not sure the Seth Hodgson thing would apply as my requests are several seconds apart. On Tue, May 27, 2008 at 2:38 PM, Seth Hodgson <[EMAIL PROTECTED]> wrote: > Injecting a current client-side timestamp into an outbound request is a > good way to avoid Http response caching if you don't control the server. > If you do control the server, you should consider configuring it to set > HTTP no-cache headers in these responses to suppress caching. > > Seth > > From: flexcoders@yahoogroups.com [mailto: > flexcoders@yahoogroups.com ] On Behalf Of > valdhor > Sent: Tuesday, May 27, 2008 9:15 AM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Re: HTTPService multiple requests not being sent? > > > This is pretty close to another qustion that was asked lately. Seth > Hodgson summed up what was going on here: > > http://tech.groups.yahoo.com/group/flexcoders/message/113808 > > --- In flexcoders@yahoogroups.com , > "javadmanx" <[EMAIL PROTECTED]> wrote: > > > > I have the following service: > > > > getStudentById.send({action: 'student_by_id', id: > > event.currentTarget.selectedItem.id}); > > > > If I make multiple requests on this same service with the same values > > it seems to cache and not send the request to the server again. The > > only way I've found to stop it from doing this is to add a time stamp > > the changes the request values. Below is the code I've used to get it > > to send the request on every call. So what it does is, if the request > > values are the same it just gives me the same data, but never calls > > the server. But if I use this below it calls the server every time. > > > > getStudentById.send({action: 'student_by_id', id: > > event.currentTarget.selectedItem.id, tt: new Date().getTime()}); > > > > What am I doing, and is there a better way to get all requests to call > > the server even if the request values are the same? Thanks. > > > > > -- "All that is necessary for the triumph of evil is that good men do nothing." - Edmund Burke
Re: [flexcoders] Re: HTTPService multiple requests not being sent?
You won't get the information in the servlet if your server is caching a text response. The browser may only be doing a head request, or it may be as you suspect doing nothing. Download a debugging proxy like Charles ( http://www.charlesproxy.com/ ) to be sure. It'll tell you exactly what's going on. -J On Wed, May 28, 2008 at 1:24 PM, Justin Stanczak <[EMAIL PROTECTED]> wrote: > I do have control of the server and I'm using GET requests. I've also > done the setting headers. None of that did any thing. I am sending requests > to a single Servlet. I've setup a message to print in the log if any request > comes in and it shows the client never made a request. I think this is > truely the client caching. I'll try the post method, but I think I did that, > not sure. However like I said I created the Servlet and it's not getting any > hit from the client at all. It's like the client just looks at the request > params and sends the last requests data, if the params match. I'm not sure > the Seth Hodgson thing would apply as my requests are several seconds apart. > > > On Tue, May 27, 2008 at 2:38 PM, Seth Hodgson <[EMAIL PROTECTED]> wrote: > >> Injecting a current client-side timestamp into an outbound request is a >> good way to avoid Http response caching if you don't control the server. >> If you do control the server, you should consider configuring it to set >> HTTP no-cache headers in these responses to suppress caching. >> >> Seth >> >> From: flexcoders@yahoogroups.com [mailto: >> flexcoders@yahoogroups.com ] On Behalf Of >> valdhor >> Sent: Tuesday, May 27, 2008 9:15 AM >> To: flexcoders@yahoogroups.com >> Subject: [flexcoders] Re: HTTPService multiple requests not being sent? >> >> >> This is pretty close to another qustion that was asked lately. Seth >> Hodgson summed up what was going on here: >> >> http://tech.groups.yahoo.com/group/flexcoders/message/113808 >> >> --- In flexcoders@yahoogroups.com , >> "javadmanx" <[EMAIL PROTECTED]> wrote: >> > >> > I have the following service: >> > >> > getStudentById.send({action: 'student_by_id', id: >> > event.currentTarget.selectedItem.id}); >> > >> > If I make multiple requests on this same service with the same values >> > it seems to cache and not send the request to the server again. The >> > only way I've found to stop it from doing this is to add a time stamp >> > the changes the request values. Below is the code I've used to get it >> > to send the request on every call. So what it does is, if the request >> > values are the same it just gives me the same data, but never calls >> > the server. But if I use this below it calls the server every time. >> > >> > getStudentById.send({action: 'student_by_id', id: >> > event.currentTarget.selectedItem.id, tt: new Date().getTime()}); >> > >> > What am I doing, and is there a better way to get all requests to call >> > the server even if the request values are the same? Thanks. >> > >> >> > > > -- > "All that is necessary for the triumph of evil is that good men do > nothing." - Edmund Burke > > -- "Therefore, send not to know For whom the bell tolls. It tolls for thee." :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]