Bug Tracker

Modify

Ticket #6589 (closed enhancement: wontfix)

Opened 3 years ago

Last modified 15 months ago

jQuery.ajax Browser History Enhancement

Reported by: rgrwkmn Owned by:
Priority: undecided Milestone: 1.4.3
Component: ajax Version: 1.4.2
Keywords: history Cc:
Blocking: Blocked by:

Description

I know there are plugins that cover this functionality, but why include another js file and write extra code? Why not build browser history management into the standard ajax method?

You could add a couple properties into the ajax method:

updateHistory - Boolean, defaults to false

historyHash - String, the hash to add to the url

There would also need to be a history init method that would load a url if a location hash exists on page load as well as loads triggered on browser back/forward buttons obviously.

This would take care of very simple ajax loads. The tricky part is keeping the flexibility that a history plugin has, since the developer may use location hashes that don't correspond directly to the url being loaded and also could require post or get data.

Change History

comment:1 Changed 3 years ago by snover

  • Priority set to undecided
  • Status changed from new to closed
  • Resolution set to wontfix

Most people don’t require their AJAX requests to be stateful, and adding statefulness requires the developer perform a fair amount of additional work to manage hash changes. This belongs as a separate plugin, not in core.

comment:2 Changed 2 years ago by anonymous

masoud

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.