Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#8032 closed bug (duplicate)

jQuery.ajax: cache is not set to false if dataType is javascript

Reported by: paxos Owned by:
Priority: high Milestone: 1.5
Component: ajax Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:

Description

Documentation says:

cache Default: true, false for dataType 'script' and 'jsonp'

Thats definitly not true. On Firefox, you have to explicit set cache to false, even when using datatype script.

If you dont do it, Firefox overwrites its cache with the ajax response. This gets some really wired side-effects.

Example:

URL: /index Responses different if browser uses HTML or AJAX request.

  1. Open page /index
  2. On this page, an ajax request is sent to same url, different ajax response is parsed
  3. I browse do different url, i.e. /index2
  4. I hit the back button. And i got: The former Ajax response instead of the html site!

Change History (2)

comment:1 Changed 8 years ago by jitter

Component: unfiledajax
Milestone: 1.next1.5
Priority: undecidedhigh
Resolution: duplicate
Status: newclosed

Thanks for taking the time to contribute to the jQuery project by writing a bug report.

This issue was already reported and has been fixed already. The fix is included in the recently released jQuery-1.5-beta-1.

Please try with that version and report back if the issue is fixed for you.

comment:2 Changed 8 years ago by jitter

Duplicate of #7578.

Note: See TracTickets for help on using tickets.