Reputation: 3869
I am whatching a tutorial that has the following code
But I can't understand what are url
, cache
and success
? Are they arrays? How do they work?
Upvotes: 0
Views: 41
Reputation: 1539
You can find below the explanations:
cache
Type: Boolean
A Boolean value indicating whether the browser should cache the requested pages. Default is true.
If set tofalse
, it will force requested pages not to be cached by the browser. Note: Setting cache to false will only work correctly with HEAD and GET requests. It works by appending "_={timestamp}" to the GET parameters.
url
Type: String
Specifies the URL to send the request to. Default is the current page
success(result,status,xhr)
Type: Function( Anything data, String textStatus, jqXHR jqXHR )
A function to be run when the request succeeds A function to be called if the request succeeds. The function gets passed three arguments: The data returned from the server, formatted according to thedataType
parameter or thedataFilter
callback function, if specified; a string describing the status; and thejqXHR
(in jQuery 1.4.x, XMLHttpRequest) object.
Everything is explained in the jQuery.ajax() Documentation
Upvotes: 1