I have a phonegap webview loading an external page. I am trying to override the back button so the user can go back on the website, and when they hit the first page it exists the application. I saw this link about disabling the cache, Strange webview goBack issue in android but it did the same thing as well.
package com.myapp.net;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import org.apache.cordova.DroidGap;
import android.webkit.WebView;
import android.webkit.WebSettings;
public class Shop extends DroidGap {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //setContentView(R.layout.activity_shop);
        super.setBooleanProperty("loadInWebView", true);
        super.loadUrl("http://mywebappurl.com/");
    }
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_shop, menu);
        return true;
    }
    @Override
    public void onBackPressed()
    {
        WebView webView1 = (WebView) findViewById(R.id.webView1);
        webView1.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
        if(webView1.canGoBack())
            webView1.goBack();
        else
            super.onBackPressed();
    }
}