You are developing an application that consumes an external web service that returns the
latest stock rate.
The application has two methods:
The getResults() method makes an AJAX web service request
The ShowRate() method displays the stock rate from the web service response
You need to ensure that the ShowRate() method always displays the latest stock rate.
Which code segment should you use?

A.
Option A
B.
Option B
C.
Option C
D.
Option D
I’m wondering if “type:” for D is supposed to be GET rather than POST. For two reasons:
1) the function is getResults()
2) http://api.jquery.com/jquery.ajax/ says that cache:false is only used in HEAD and GET requests.
Maybe a typo?
0
0
” always displays the latest stock rate “. Should use cache: false
Note: cache (default: true, false for dataType ‘script’ and ‘jsonp’)
Type: Boolean
If set to false, it will force requested pages not to be cached by the browser.
Reference: jQuery.ajax()
0
0