Question: I am still a beginner in Android and java. I am trying to load an image from a server by using AsyncTask. The size of the image is around 50kb. Yet it takes several seconds to show up. The following code is used to download the image from the server. 

```
    public static Bitmap getBitmapFromURL(String src) {

    try {

        URL url = new URL(src);

        HttpURLConnection connection = (HttpURLConnection) url
                .openConnection();

        connection.setDoInput(true);

        connection.connect();

        InputStream input = connection.getInputStream();
        BufferedInputStream bis = new BufferedInputStream(input);
        Bitmap myBitmap = BitmapFactory.decodeStream(bis);

        return myBitmap;

    } catch (IOException e) {

        e.printStackTrace();

        return null;

    }

```

Can someone please tell me how to speed up this process. What are the factors this process depends on apart from the network speed?

Thank you in advance.

Answer: 
The `tagName` for that element is `INPUT`; there are no elements with tag name `submit`. Try this:

```
document.getElementsByName('REG_BTN')[0].click();

```
If page is complete loading first, and use querySelector (CSS) and click.

'

```
if (document.readyState=='complete'){
  document.querySelector('input[type*="submit"]').click();
}

```

'