{"id":16184644,"url":"https://github.com/rmariuzzo/jquery-ajax-latency-simulator-plugin","last_synced_at":"2025-03-19T02:31:30.742Z","repository":{"id":2609046,"uuid":"3592532","full_name":"rmariuzzo/jQuery-Ajax-Latency-Simulator-Plugin","owner":"rmariuzzo","description":"A jQuery plugin that simulate latency for any AJAX request via jQuery plugin","archived":false,"fork":false,"pushed_at":"2016-03-01T14:48:07.000Z","size":3,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-11T07:10:56.538Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rmariuzzo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-03-01T14:17:16.000Z","updated_at":"2016-03-10T17:13:08.000Z","dependencies_parsed_at":"2022-07-21T11:33:04.960Z","dependency_job_id":null,"html_url":"https://github.com/rmariuzzo/jQuery-Ajax-Latency-Simulator-Plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmariuzzo%2FjQuery-Ajax-Latency-Simulator-Plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmariuzzo%2FjQuery-Ajax-Latency-Simulator-Plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmariuzzo%2FjQuery-Ajax-Latency-Simulator-Plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmariuzzo%2FjQuery-Ajax-Latency-Simulator-Plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rmariuzzo","download_url":"https://codeload.github.com/rmariuzzo/jQuery-Ajax-Latency-Simulator-Plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221720424,"owners_count":16869483,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T07:10:59.151Z","updated_at":"2024-10-27T19:09:07.030Z","avatar_url":"https://github.com/rmariuzzo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"jQuery AJAX Latency Simulator Plugin\n====================================\n\n# Deprecated!\n\nThis is a jQuery plugin that simulates HTTP latency when requesting resources using `jQuery.ajax`. This plugin affect all jQuery functions related to AJAX since all of these functions internally use `jQuery.ajax`.\n\nThis plugin it is not designed for production use. Instead it was developed to simulate latency when developing a jQuery web application locally, where resources that are requested via AJAX are delivery too fast.\n\nHow to use it?\n--------------\n\nIt should be simple, and it is. It takes one line after including jQuery and the plugin (of course!).\n\n```html\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003cscript type=\"text/javascript\" src=\"/path/to/jquery.js\"\u003e\u003c/script\u003e\n    \u003cscript type=\"text/javascript\" src=\"/path/to/jquery.ajax.latency.simulator.js\"\u003e\u003c/script\u003e\n    \u003cscript type=\"text/javascript\"\u003e\n      jQuery(function($) {\n        // All AJAX request will be delayed by 5000 ms.\n        $.fn.ajaxLatencySimulator({delay : 5000});\n      });\n    \u003c/script\u003e\n  \u003c/head\u003e\n\u003c/html\u003e\n```\n\nI told you that is just _that simple_.\n\nAny options (aka documentation)?\n--------------------------------\n\nYou can configure the behaviour of the latency. It could be _linear_ (as in the previous example) or _variable_. The following snippet shows you how to get a _linear_ or a _variable_ latency.\n\n```js\n// I would like a linear latency of 3.5 seconds.\n$.fn.ajaxLatencySimulator({delay : 3500});\n```\n\n```js\n// I would like a variable latency from 2 seconds to 6 seconds.\n$.fn.ajaxLatencySimulator({min : 2000, max : 6000});\n```\n    \nAnd that's all.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmariuzzo%2Fjquery-ajax-latency-simulator-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frmariuzzo%2Fjquery-ajax-latency-simulator-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmariuzzo%2Fjquery-ajax-latency-simulator-plugin/lists"}