{"id":19028393,"url":"https://github.com/zinovyev/rack-refresher","last_synced_at":"2026-05-02T00:30:29.829Z","repository":{"id":56890217,"uuid":"135409459","full_name":"zinovyev/rack-refresher","owner":"zinovyev","description":"Rack middleware for authomatic page refresh","archived":false,"fork":false,"pushed_at":"2018-05-30T10:05:12.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-25T13:02:18.844Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zinovyev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-30T08:04:54.000Z","updated_at":"2018-05-30T10:05:13.000Z","dependencies_parsed_at":"2022-08-21T00:50:34.921Z","dependency_job_id":null,"html_url":"https://github.com/zinovyev/rack-refresher","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/zinovyev%2Frack-refresher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zinovyev%2Frack-refresher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zinovyev%2Frack-refresher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zinovyev%2Frack-refresher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zinovyev","download_url":"https://codeload.github.com/zinovyev/rack-refresher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240079610,"owners_count":19744720,"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-11-08T21:10:58.522Z","updated_at":"2026-05-02T00:30:29.773Z","avatar_url":"https://github.com/zinovyev.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rack-refresher\n\nRack middleware for authomatic page refresh\n\n# About\n\nRefresh the content of your page with a given interval\n\n# Installation\n\n```bash\n\n  gem install rack-refresher\n\n```\n\n# Set Up And Configuration\n\nAdd the middleware inclusion to the `config.ru` file (before the `run Application` directive):\n\n```ruby\n\n  require \"rack-refresher\"\n\n  use Rack::Refresher do |config|\n    config.ajax  = true\n    config.delay = 1000\n  end\n\n```\n\n**Configuration options**:\n\n* `config.ajax = true` (Default: `false`) Refresh only the `\u003cbody\u003e` tag of the page in background via AJAX. The page will be fully reloaded if this option is not set;\n\n* `config.delay = 1000` (Default: `5000`, alias: `config.interval`) Refresh interval defined in milliseconds. 1000 milliseconds == 1 second;\n\nThe middleware can be included several times. For example the following code will create 2 refreshers: the first one will refresh the page every 5 seconds via AJAX and the second one will refresh the page every 5 minutes via reload:\n\n```ruby\n\n  require \"rack-refresher\"\n\n  use Rack::Refresher do |config|\n    config.ajax  = true\n    config.delay = 5000 # Every 5 seconds\n  end\n\n  use Rack::Refresher do |config|\n    config.delay = 300_000 # Every 5 minutes\n  end\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzinovyev%2Frack-refresher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzinovyev%2Frack-refresher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzinovyev%2Frack-refresher/lists"}