Bug Tracker

Modify

Ticket #8032 (closed bug: duplicate)

Opened 2 years ago

Last modified 15 months ago

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:
Blocking: Blocked by:

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

comment:1 Changed 2 years ago by jitter

  • Priority changed from undecided to high
  • Resolution set to duplicate
  • Status changed from new to closed
  • Component changed from unfiled to ajax
  • Milestone changed from 1.next to 1.5

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 2 years ago by jitter

Duplicate of #7578.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.