{"id":19040148,"url":"https://github.com/logisticinfotech/webview-clean-content","last_synced_at":"2026-06-13T20:03:21.404Z","repository":{"id":97377355,"uuid":"138184764","full_name":"logisticinfotech/webview-clean-content","owner":"logisticinfotech","description":null,"archived":false,"fork":false,"pushed_at":"2018-07-30T15:07:46.000Z","size":328,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-02T07:10:12.967Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","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/logisticinfotech.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-21T14:52:52.000Z","updated_at":"2018-07-30T15:07:47.000Z","dependencies_parsed_at":"2023-04-04T03:36:11.076Z","dependency_job_id":null,"html_url":"https://github.com/logisticinfotech/webview-clean-content","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/logisticinfotech%2Fwebview-clean-content","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logisticinfotech%2Fwebview-clean-content/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logisticinfotech%2Fwebview-clean-content/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logisticinfotech%2Fwebview-clean-content/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/logisticinfotech","download_url":"https://codeload.github.com/logisticinfotech/webview-clean-content/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240100520,"owners_count":19747682,"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-08T22:20:50.602Z","updated_at":"2026-05-08T03:30:22.883Z","avatar_url":"https://github.com/logisticinfotech.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webview-clean-content\n\n![Clena UIWebVIew Content](https://www.logisticinfotech.com/wp-content/uploads/2018/06/375-667.gif)\n\n## Introduction\n\nSometimes we may need to clear content loaded on our UIWebView as per our requirements and optimisations.\n\nGenerally to do this we will load blank html page without any content but it will take time and load to load html page. \n\nInstead we can easily accomplish this by just single line of Javascription code. \n\nYou can find step by step guide from [this blog](https://www.logisticinfotech.com/blog/clean-uiwebview-content)\n\nHere is code for that for Objective C and Swift both.\n\n## Objective C\n```\nNSString *urlString = @”https://www.google.com/”;\nNSURL *url = [NSURL URLWithString:urlString];\n\nNSURLRequest *urlRequest = [NSURLRequest requestWithURL:url];\n\n[_webView loadRequest:urlRequest];\n```\n\n## Swift \n\n```\nlet url = URL(string: “about:blank”)\nlet requestObj = URLRequest(url: url! as URL)\nwebView.loadRequest(requestObj)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogisticinfotech%2Fwebview-clean-content","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flogisticinfotech%2Fwebview-clean-content","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogisticinfotech%2Fwebview-clean-content/lists"}