Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query - Are the js requests cached #34

Closed
deeptechtons opened this issue Jan 2, 2012 · 3 comments
Closed

Query - Are the js requests cached #34

deeptechtons opened this issue Jan 2, 2012 · 3 comments

Comments

@deeptechtons
Copy link

I am providing the javascript requests from server with proper cache headers, but i don't know if these requests are cached. Does script.js provide any mechanism for caching or it is completely taken care by browsers. Can the script.js be used for Css too?

@RoryH
Copy link

RoryH commented Mar 8, 2012

Caching is handled by the serving web server and is not handled by script.js. Javascript cannot control caching headers.

@deeptechtons
Copy link
Author

Ohh sorry, i never meant that. Like are requests to same files added again by the script.js library. something like $script.get("jquery.min.js");$script.get("jquery.min.js"); will this add 2 script references to be downloaded async.

@ded
Copy link
Owner

ded commented Mar 8, 2012

it will not download the second one. any duplicate paths get ignored and immediately call your callback method

@ded ded closed this as completed Mar 8, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants