Skip to Main Content
Head Rush Ajax
book

Head Rush Ajax

by Brett McLaughlin
March 2006
Beginner to intermediate content levelBeginner to intermediate
448 pages
13h 33m
English
O'Reilly Media, Inc.
Content preview from Head Rush Ajax
120
Chapter 2
I don’t think we don’t need to worry about caching in
the Break Neck app. If the phone number is different,
the request URL will be different. And if it’s the same
phone number, we don’t need fresh data from the
server; the customer’s address is the same each time.
You don’t always need to worry about caching.
In the Break Neck app, the request URL will be
unique for each phone number, so there won’t
be any caching problems there.
If a customer enters the same phone number,
caching probably would keep the request from
going to the Break Neck server... but in that
case, the server really would be returning the
same customer data—the customer’s address—
each time. So in that situation, caching actually
saves your customer’s time.
Be sure you don’t end up adding code that you
don’t need to your applications. In the Break
Neck app, there’s no need to make any changes
to the code you’ve already got.
Good thinking!
Man, Break Neck pizza rocks. There’s
nothing like a breakfast of cold pizza, a
whipped latte from Starbuzz, and the
Webville Times to read.
<script>
var request...
function foo()
{
...
}
</script>
JavaScript
<script>
var request...
function foo()
{
...
}
</script>
Customer’s Phone Number
Customer’s Address
Customer’s Order
caching and break neck pizza
This means we’re done with
Step 4! On to Step 5...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Reinventing the Organization for GenAI and LLMs

Reinventing the Organization for GenAI and LLMs

Ethan Mollick
Head First Ajax

Head First Ajax

Rebecca M. Riordan

Publisher Resources

ISBN: 0596102259Errata PageSupplemental Content