Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6338041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:22:00+00:00 2026-05-24T19:22:00+00:00

I am working on an application where i am loading a webpage from a

  • 0

I am working on an application where i am loading a webpage from a an external url in a webview. The page loading takes a lot of time. If i open the same url in android’s native browser that loads absolutely fine, but the performance is really bad in my custom webview.

here is the onCreate method of my customWebView Activity.

 protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    setContentView(R.layout.custom_web_view);
    String uri = getIntent().getExtras().getString("uri");
    webView = (WebView) findViewById(R.id.cus_webview);
    dialog = ProgressDialog.show(CustomeWebViewActivity.this, "", "Loading. Please wait...", true, true);
    webView.getSettings().setJavaScriptEnabled(true);
    webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(false);
    webView.getSettings().setPluginsEnabled(false);
    webView.getSettings().setSupportMultipleWindows(false);
    webView.getSettings().setSupportZoom(false);
    webView.getSettings().setJavaScriptEnabled(true);
    webView.getSettings().setSavePassword(false);
    webView.setVerticalScrollBarEnabled(false);
    webView.setHorizontalScrollBarEnabled(false);
    webView.setWebChromeClient(new MyWebChromeClient());

    webView.clearCache(true);
    webView.clearHistory();
    webView.loadUrl(uri);
    webView.setWebViewClient(new MyWebView());
}

Is there anything i can do to reduce the loading time of webpage through my custom web view. please, any help is appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T19:22:02+00:00Added an answer on May 24, 2026 at 7:22 pm

    Remove these two lines:

    webView.clearCache(true);
    webView.clearHistory();
    

    and it will load faster.

    You could do this after your page has loaded, and it will remove it all without the user noticing although it may make some odd behaviour. You could remove it in another thread or other method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working in iOS 5,and before loading my application,I want to open a
I'm working on an android application, and I have a drawable that I'm loading
The application I am working on has a terribly slow loading web page. If
I'm working on an android application, and I have a drawable that I'm loading
I'm working on a mvc application that uses jquery to implement dynamically loading page
I'm working on a Silverlight application that works with WCF services. While loading the
I am working on a map application in iPhone. While loading the MapViewController the
An application I'm working on takes 338MB private bytes and 780MB virtual bytes right
I am working on an ASP.NET MVC application and using jQuery. I understand from
I'm working on an application which uses data from db which has to be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.