Simple jQuery Plugin For POST Or GET Redirection - redirect

File Size: 71 KB
Views Total: 17535
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Simple jQuery Plugin For POST Or GET Redirection - redirect

redirect is a jQuery plugin that allows to redirect the current page with nested objects and arrays to another URL via either Post or Get methods.

How to use it:

1. To use this plugin, you first have to load the jQuery redirect plugin's script after jQuery library as this:

<script src="//"></script>
<script src="jquery.redirect.js"></script>

2. The JavaScript to redirect the page to another via default POST method.

    user: "johnDoe",
    password: "12345",
    submit: "name"
  "POST", "_blank");

3. All default parameters for the redirect function.

  • url - Url of the redirection
  • values - (optional) An object with the data to send. If not present will look for values as QueryString in the target url.
  • method - (optional) The HTTP verb can be GET or POST (defaults to POST)
  • target - (optional) The target of the form. "_blank" will open the url in a new window.
$.redirect = function (url, values, method, target)



  • v1.2.0: clean up


  • v1.1.4: Updated package


  • v1.1.4: Delete form after submit, update docs and fix spdx license


  • Add support for frames


  • Fixed issues with POSTing an array of objects


  • v1.0.5


  • Fix for GET method

This awesome jQuery plugin is developed by mgalante. For more Advanced Usages, please check the demo page or visit the official website.