Open shogun70 opened 12 years ago
If the request is:
history.pushState()
b. different to the current page, then the response can be cached so handle with location.assign()
. (But are GET requests with a query typically tagged as cacheable?)history.pushState()
b. different to the current page, then the response cannot be cached, so would have to trigger a normal browser form-submit which would incur another request. There is no way to detect in advance whether HTTP POST is a) or b), so just ignore it for now. Could fix HTTP GET, but not sure how often caching is enabled for GET form handling.
An alternative is to modify HTMLDecor to replace the current decor as well as real content when requested content doesn't have matching decor.
Probably this should be opt-in behavior.
As of 2.0.x.5, HTMLDecor handles <form method="GET">
by generating a URL based on @action
and the form's input values and then performs normal panning to that page.
Other @method
s are not handled by HTMLDecor and will default to the browsers standard behavior.
Users of the library are encourage to use AJAX to handle these.
Currently panning isn't implemented for form submission, because HTMLDecor doesn't intercept submit events.