{"id":19218587,"url":"https://github.com/sitespeedio/compare","last_synced_at":"2025-08-19T13:32:24.436Z","repository":{"id":24682576,"uuid":"102206283","full_name":"sitespeedio/compare","owner":"sitespeedio","description":"Compare HAR files.","archived":false,"fork":false,"pushed_at":"2024-01-31T16:25:04.000Z","size":2409,"stargazers_count":105,"open_issues_count":16,"forks_count":18,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-04-13T20:53:23.622Z","etag":null,"topics":["har","perfmatters","waterfall","webperf"],"latest_commit_sha":null,"homepage":"https://compare.sitespeed.io","language":"JavaScript","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/sitespeedio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-09-02T15:37:01.000Z","updated_at":"2024-02-01T17:19:37.000Z","dependencies_parsed_at":"2024-03-02T03:44:02.700Z","dependency_job_id":null,"html_url":"https://github.com/sitespeedio/compare","commit_stats":{"total_commits":202,"total_committers":10,"mean_commits":20.2,"dds":"0.24752475247524752","last_synced_commit":"84046506c17e56548378d2376ed4c649666fefff"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sitespeedio%2Fcompare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sitespeedio%2Fcompare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sitespeedio%2Fcompare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sitespeedio%2Fcompare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sitespeedio","download_url":"https://codeload.github.com/sitespeedio/compare/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230062899,"owners_count":18166961,"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":["har","perfmatters","waterfall","webperf"],"created_at":"2024-11-09T14:27:17.779Z","updated_at":"2024-12-19T00:08:26.896Z","avatar_url":"https://github.com/sitespeedio.png","language":"JavaScript","readme":"# Compare HAR files\nMake it easier to find regressions by comparing your [HAR](http://www.softwareishard.com/blog/har-12-spec/) files. Test it out https://compare.sitespeed.io or look at the video: https://youtu.be/dCThwpglIeE\n\n![Logo](https://raw.githubusercontent.com/sitespeedio/compare/main/img/compare.png)\n\n## First: Shout out!\nWe couldn't built compare without the support or inspiration from the following people:\n * Thank you [Michael Mrowetz](https://twitter.com/MicMro) :bow: for creating [PerfCascade](https://github.com/micmro/PerfCascade) (the SVG HAR waterfall viewer).\n * Thank you [Patrick Meenan](https://twitter.com/patmeenan) :bow:. Pat has built the HAR compare viewer in [WebPageTest](https://www.webpagetest.org/) that inspired us to the idea with the slider.\n\nIf you like our project, please give them also some extra love :)\n\n## Comparing\n![Compare two different HAR files](https://raw.githubusercontent.com/sitespeedio/compare/main/docs/img/compare.png)\n\n## How it works\nAs long as your HAR files follow the [HAR specification](http://www.softwareishard.com/blog/har-12-spec/) you can use them in Compare. Standard HARs will give you some basic functionality and HARs from WebPageTest and sitespeed.io will give you more.\n\n### HARs from Firefox/Chrome/Safari (and other browsers).\nFor all HARs we will show the waterfall (using [PerfCascade](https://github.com/micmro/PerfCascade)) and statistics for the page (using [PageXray](https://github.com/sitespeedio/pagexray)).\n\n### WebPageTest\nIf you add a [WebPageTest](https://www.webpagetest.org) HAR we will show SpeedIndex and FirstVisualChange and if you used Chrome to collect CPU stats, we will show that too. You will get some extra sugar if your HAR is from WebPageTest! Do you have something else that we should add? Create an issue or send a PR!\n\n### sitespeed.io/Browsertime\nIf you want even more sugar, you should use HAR files from [sitespeed.io](https://github.com/sitespeedio/sitespeed.io) or [Browsertime](https://github.com/sitespeedio/browsertime): SpeedIndex, FirstVisualChange, LastVisualChange and a graph for VisualProgress.\n\nIf you deploy your result from your sitespeed.io run to a server and use **--resultBaseURL** when you run sitespeed.io, we will also pickup the screenshot, video and a link to the result page.\n\nIf you also run with **--firstParty** (adding a regex that show which assets that are first/third parties) we will will show data grouped by party.\n\n![First Party vs Third Party!](https://raw.githubusercontent.com/sitespeedio/compare/main/docs/img/firstparty.png)\n\n## How to use it\nYou can either upload two HAR files (drag/drop) or give the URL to two URLs hosted online. If your HAR got multiple pages/runs, you can use just one HAR file.\n\nOr you can just copy/paste your HAR file into the start page of [compare.sitespeed.io](https://compare.sitespeed.io/).\n\nIf you host your sitespeed.io result pages, you can copy/paste the URL to a page or to a specific run and Compare will automagically find the URL to the HAR file.\n\n### Configuration\nYou can use a configuration JSON to choose which HAR files that will be tested. The minimal configuration needed:\n\n```json\n{\n  \"har1\": {\n    \"url\": \"https://www.url.com/page1.har\"\n  },\n  \"har2\": {\n    \"url\": \"https://www.url.com/page2.har\"\n  }\n}\n```\n\nBut you can also add some extra sugar. All the extras are optional:\n```json\n{\n  \"har1\": {\n    \"url\": \"https://www.url.com/page1.har\",\n    \"label\": \"Before change\",\n    \"run\": 1\n  },\n  \"har2\": {\n    \"url\": \"https://www.url.com/page2.har\",\n    \"label\": \"After change\",\n    \"run\": 2\n  },\n  \"title\": \"The page title used in the title bar\",\n  \"firstParty\" : \" (.*wikipedia.*||.*wikimedia.*)\", // RegEx that defines first party requests\n  \"comments\": {\n    \"intro\": \"Extra information put at the top of the page\",\n    \"waterfall\": \"Text displayed at top of the waterfall\",\n    \"visualProgress\": \"Text displayed at the top of visual progress\",\n    \"domains\": \"Text displayed at the top of domains\",\n    \"requestDiff\": \"Text displayed at the top of request/response diff\",\n    \"firstParty\": \"Text displayed at the top of first/third party\"\n  }\n}\n```\n\n\nAnd then you can use your configuration file in different ways. You can copy/paste the configuration into the start page of [compare.sitespeed.io](https://compare.sitespeed.io).\n\nOr you can use it like this: https://compare.sitespeed.io/?config=https://URL_TO_THE_CONFIG_FILE\n\nMake sure that your server has correct [CORS settings](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) so that compare.sitespeed.io can get the HAR file.\n\n### Github gist\nYou can also use host your configuration file on a [Github gist](https://gist.github.com/) and use the gist id https://compare.sitespeed.io?gist=GIST_ID to get the configuration file.\n\nYou can checkout out our example:\n[https://gist.github.com/soulgalore/94e4d997a78e03b32b939fcea63eae8e](https://gist.github.com/soulgalore/94e4d997a78e03b32b939fcea63eae8e)\n\nYou can also copy/paste gist id (or the full URL to the gist) into [compare.sitespeed.io](https://compare.sitespeed.io).\n\nThank you [Matt Hobbs](https://github.com/Nooshu) for sharing the gist idea!\n\n### Compare on the fly\nYou can also compare two HAR files on the fly without using a configuration file.\n\nAdd the parameters **?har1=FULL_URL1\u0026har2=FULL_URL2\u0026compare=1** and the two HAR files will be compared.\n\n## Developers\n\nTo run the project locally start a server with:\n```\nnpm run develop\n```\n\nSend us a PR/create an issue. If you have big change coming up, please discuss it with us in an issue first!\n\n## Deploy your own version\nDeploying your own version is easy:\n1. Clone the repo: `git clone git@github.com:sitespeedio/compare.git`\n2. Build: `cd compare \u0026\u0026 npm run build`\n3. Copy everything in *build/* to your server\n\n## Privacy\nWe take your privacy really serious: We do not use any tracking software at all (no Google Analytics or any other tracking software) in [compare.sitespeed.io](https://compare.sitespeed.io). The page do no call home.\n\nAnd you can deploy your own version of [compare.sitespeed.io](https://compare.sitespeed.io) if you want to be 100% in control.\n\n### Be kind\nIf you deploy your own version: please keep the original logo and the link to the project. We have spent a lot of our free time to work on this!\n\n## The logo\nThe compare logo (and the rest of the sitespeed.io logos) are made by [Mochamad Arief](https://twitter.com/mochawalk),\nyou can find his stuff at http://www.mochawalk.com/.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsitespeedio%2Fcompare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsitespeedio%2Fcompare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsitespeedio%2Fcompare/lists"}