I am using Jquery.js and i want to know does the browser cache the jquery file or this file transfer for each page.
2 Answers
Caching has nothing to do with a particular file, it's all about the headers for this file.
By default most file will be cached however the duration of the caching depends on the header setting for the file. So yes it should be cached with a default setup.
Here is a little information about caching http://www.web-caching.com/mnot_tutorial/how.html
1 Comment
It depends on both the server and the client. Once the client has a file, it can use the If-Modified-Since header to tell the server about a cached copy of a file. The server can then respond with a 304 status with optional Last-Modified, Expires and Cache-Control headers, to indicate the status of caching and when the client should request for a new copy. If a cached copy isn't available, the server can respond normally.
You should consider using one of the publicly hosted jQuery files: http://docs.jquery.com/Downloading_jQuery#CDN_Hosted_jQuery
These are more likely to be cached on a client.