XStandard Web Services And Random URL Parameters

Posted July 26, 2006 at 1:16 PM

Tags: XStandard WYSIWYG

As I posted earlier, I was having some funkiness with XStandard caching data and showing up duplicates of stuff. I had originally thought that since my debugging (my custom XStandard configuration) was turned on, it was some how hamstringing XStandard on LARGE SOAP responses. I found out that this is not the case; after a temporary fix, the weirdness came back.

I think I have finally found a solid fix. If I put a random variable in the URL for the web service call, it seems to work well:

 Launch code in new window » Download code as text file »

  • <!--- Attachment library. --->
  • <param
  • name="AttachmentLibraryURL"
  • value="...[long url]...&rand=#RandRange( 1, 1000 )#"
  • />

The randomness of the "rand" URL parameter forces the server and the browser (or whatever XStandard's internal mechanism is) to think the web service call is unique and therefor cannot use any kind of caching mechanism. Now, this is not for EVERY web service call; the randomization only occurs when the browser is first loaded... but, this seems to take care of the problem.

I have had this in place for a day and so far nothing out of the ordinary. Now, again, I don't know how XStandard works under the hood, and I am not convinced this was the correct solution or that it has anything to do with this, that, and the other. For all I know, me restarting my computer last night could have been the fix. Either way, it's all good at the moment.

Download Code Snippet ZIP File

Post Comment  |  Ask Ben  |  Print Page



Learning ColdFusion 9 - ColdFusion 9 tutorials, samples, examples, demos

Reader Comments

There are no comments posted for this web log entry.


Post Comment  |  Ask Ben

Recent Blog Comments
Tim
Mar 9, 2010 at 11:21 PM
DreamWeaver CS3 Slows Me Down
Revisiting the slow upload probs. On Vista & DW CS3 I had long waits when uploading locally and to a SFTP server. "Maintain synchronization information" within the site definition was the problem. Un ... read »
Mar 9, 2010 at 6:57 PM
Terms Of Service / Privacy Policy Document Generator
Thanks so much!!!! Definitely going to refer this to others. ------- Yanike Mann http://www.yeoworks.com ... read »
Mar 9, 2010 at 5:03 PM
Ask Ben: Javascript Replace And Multiple Lines / Line Breaks
Hello Ben, I'm having a lot of problems with a function that transform an single-line input-given value in a slug. The function is: function slug(fromm, tooo) { if (document.getElementById(fromm)) { ... read »
Mar 9, 2010 at 4:47 PM
ColdFusion, jQuery, And "AJAX" File Upload Demo
Oh, for crying out loud! Never mind, I figured it out! (slapping myself up side the head). It's been a really long day. Ok, so this works perfectly. Thank you for the great code! And for letti ... read »
Mar 9, 2010 at 4:38 PM
ColdFusion, jQuery, And "AJAX" File Upload Demo
I'm having a bugger of a time with this. I'm trying to use it with PHP instead. I know the PHP script works fine without the javascript (just submitting a regular form) and according to FireBug, th ... read »
Mar 9, 2010 at 4:25 PM
Calculating Your Weight Lifting Rep Maximum Using ColdFusion
The reason for the percentages being different work intensities for shoulders vs bench press is that there is further formulas required which integrate co-efficients relative to muscle mechanics for ... read »
Mar 9, 2010 at 4:01 PM
Ask Ben: Reading In A File Using CFFile And CFInclude
Ben, do you know what is the size of the file CFFILE can read into one variable. I have a big text file which is 350 K with over 250 K records. It seems that ColdFusion refuse to read the file into ... read »
Mar 9, 2010 at 3:36 PM
Ask Ben: Getting The Start And End Dates Of The Previous Week In ColdFusion
Is this example providing the previous week or is it providing a span of 7 days which may include last week? ... read »