Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#10972 closed bug (worksforme)

AJAX cache option for scripts is ALWAYS false

Reported by: Youri Owned by:
Priority: low Milestone: None
Component: ajax Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:

Description

To improve performance my a website, I tried to allow caching of several JS files, which are loaded via $.ajax(). To do so, I added the option cache:true. But when I examine the response headers (chromebug/firebug), I find that jQuery still added headers as if cache was false.

Maybe the cache checks only check if cache is explicitly set to false? (Since that is the only check needed for any AJAX call, except script/jsonp).

Youri

Change History (3)

comment:1 Changed 12 years ago by Youri

EDIT: I have not added a testcase since I would have to use a crossdomain request on jsfiddle, which might influence the results.

If I'm wrong here or anyone has a way of testing this, please do tell me or test it.

comment:2 Changed 12 years ago by Timmy Willison

Component: unfiledajax
Priority: undecidedlow
Resolution: worksforme
Status: newclosed

http://jsfiddle.net/timmywil/br2BG/

Note that the query string is not manipulated.

comment:3 Changed 12 years ago by Youri

Terribly sorry something else messed up for me. This can be closed.

Note: See TracTickets for help on using tickets.