Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

CFHTTP and web caching...  will this work?

Posted on 2003-11-05
5
Medium Priority
?
348 Views
Last Modified: 2013-12-24
Instead using an FTP transfer to get an XML file off a remote web server I thought about using CFHTTP to get it.  I was then told, it may not be good because the my internet connection is running through caching servers.

Then I started to think, what if I added a random number in a URL parameter in my CFHTTP :

<cfhttp url="http://www.website.com/file.xml?noCache=#RandRange(1,999)##RandRange(1,999)##RandRange(1,999)#" method="get"...>

Will this defeat any caching issues?
0
Comment
Question by:orangachang
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 6

Expert Comment

by:PE_CF_DEV
ID: 9689296
I don't want to say I am 100% sure that would work but it should. Its the same idea as we do to get around caching servers;  we append a page request id to all the URL's. From what I can tell it has worked.
0
 
LVL 6

Expert Comment

by:PE_CF_DEV
ID: 9689329
additionally unless you are doing it more often than 1 second why not just use now() instead of random numbers.

<cfhttp url="http://www.website.com/file.xml?noCache=#urlencodedformat(now())#" method="get"...>
0
 
LVL 4

Accepted Solution

by:
procept earned 400 total points
ID: 9693124
P_CF_DEV is right, but, instead of using now() or a random number, I would suggest using getTickCount()... it's unique for every millisecond...

<cfhttp url="http://www.website.com/file.xml?noCache=#getTickCount()#" method="get"...>

HTH,

Chris


0
 
LVL 2

Expert Comment

by:jonnygo55
ID: 9695522
all these will probably work for you or:
...noCache=#CreateUUID()#...
0
 
LVL 10

Expert Comment

by:substand
ID: 9699376
should work
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question