hi, i was wondering if there is a difference between refreshing a page using jquery .reload() when submitting data using $.post and an automatic page refresh when submitting data using php?

Recommended Answers

All 2 Replies

With .reload(), when possible, you can try to force the reload from the browser cache:

Reloads the resource from the current URL. Its optional unique parameter is a Boolean, which, when it is true, causes the page to always be reloaded from the server. If it is false or not specified, the browser may reload the page from its cache.

For more information check here:

Also .reload() is not part of JQuery, it's a method of the Location interface:

Doesn't the Javascript version require two http requests to be made (the post request and then the reload) versus only one when submitting a form right away?

commented: also +13
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.