Simple jQuery Plugin For POST Or GET Redirection - redirect

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

redirect is a jQuery plugin which 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)

Change log:


  • 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.