Skip to main content

Bug Tracker

Side navigation

#8032 closed bug (duplicate)

Opened January 21, 2011 08:31PM UTC

Closed January 21, 2011 10:12PM UTC

Last modified March 10, 2012 06:33AM UTC

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!

Attachments (0)
Change History (2)

Changed January 21, 2011 10:12PM UTC by jitter comment:1

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.

Changed January 21, 2011 10:12PM UTC by jitter comment:2

Duplicate of #7578.