Jump to content

why does requests does not get cached when using ajax with post method?


yaragallamurali

Recommended Posts

Normally when we use post method with forms, the requests are geting cached. I mean when we use the back button to visit the previous page the request is not being sent to the server to display the previous form. It just loads the form from the cache and loads the field values from the cache. But it is not the case with ajax. when we use ajax with post method the requests are not cached. when we use the back button also the ajax gets the content from the server which is contrary to its "get" method. So why this difference?

Link to comment
Share on other sites

I'm guessing the cache can't make sense of partial pages.

if that is the case why is it happening in case of forms. I mean when post is used directly with <form> element in html? what is the difference between ajax post and form post?

Edited by yaragallamurali
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...