5

Developing a web app locally and I just can't get Chrome to actually go to this address, because auto search always kicks in (http://0.0.0.0:5000/api works though, for example).

enter image description here

Is there a way to overwrite this behaviour or force Chrome to try a http request first, before anything else?

I am aware I can just curl it or whatever to see the response...

kontur
  • 4,934
  • 2
  • 36
  • 62
  • 1
    So annoying, did you find the answer? – Or Duan Feb 06 '15 at 12:28
  • 1
    Not a real answer, but Chrome does go to localhost:5000 or whatever, while with 0.0.0.0 it defaults to searching... So still looking for an answer, yes. – kontur Feb 06 '15 at 13:11
  • 3
    Why are you using `0.0.0.0` in the first place? [See also this answer.](http://superuser.com/a/832816/177586) – Whymarrh Feb 15 '15 at 22:50
  • 1
    Are you trying to develop something funny? http://en.wikipedia.org/wiki/0.0.0.0 – ptrk Feb 16 '15 at 09:10

4 Answers4

4

Go to chrome://omnibox/ and check [x] Prevent inline autocomplete

The answer to this has to be in chrome://chrome-urls

you should see something like the following:enter image description here

The "full" set of settings is on the chrome://chrome-urls . Also chrome://flags is worth to check. As a side by enabling some experimental features from chrome://flags you can greatly enhance your browsers HTML5 support which can be checked at HTML 5 support . chrome://chrome-urls

else: Clear browser historythen go to settings and under Privacy --> uncheck [] Use a prediction service to help complete searches and URLs typed in the address bar . Another idea is to examine carefully if using linux the output of the following command for parameters: ps -aux | grep google-chrome-stable in my case the output tells me a lot about what parameters are used at launch by default:

/opt/google/chrome/chrome --type=renderer --disable-layer-squashing --enable-transition-compositing --enable-deferred-image-decoding --enable-display-list-2d-canvas --enable-distance-field-text --enable-encrypted-media --enable-experimental-canvas-features --enable-experimental-web-platform-features --enable-lcd-text --enable-one-copy --enable-overlay-scrollbar --enable-renderer-mojo-channel --enable-smooth-scrolling --enable-viewport-meta --enable-webgl-draft-extensions --enable-web-midi --enable-zero-copy --max-tiles-for-interest-area=512 --enable-plugin-power-saver --lang=en-US --force-fieldtrials=AutoReloadExperiment/FlagEnabled/AutoReloadVisibleOnlyExperiment/FlagEnabled/ChromeSuggestions/Default/DomRel-Enable/enable/EnhancedBookmarks/Default/ExtensionContentVerification/Enforce/ExtensionInstallVerification/None/GCM/Enabled/MaterialDesignNTP/Enabled_forced/OmniboxBundledExperimentV1/StandardR4/PasswordGeneration/Disabled/PrerenderFromOmnibox/OmniboxPrerenderEnabled/QUIC/FlagEnabled/SafeBrowsingIncidentReportingService/Default/SettingsEnforcement/no_enforcement/UMA-Dynamic-Binary-Uniformity-Trial/default/UMA-Population-Restrict/normal/UMA-Uniformity-Trial-1-Percent/group_09/UMA-Uniformity-Trial-10-Percent/group_02/UMA-Uniformity-Trial-100-Percent/group_01/UMA-Uniformity-Trial-20-Percent/group_04/UMA-Uniformity-Trial-5-Percent/group_16/UMA-Uniformity-Trial-50-Percent/group_01/UwSInterstitialStatus/OnButInvisible/VoiceTrigger/Install/WebRTC-IPv6Default/Default/ --enable-crash-reporter=9F2AFD26-85F1-40CB-991F-0980EF2C4D14 --enable-offline-auto-reload --enable-offline-auto-reload-visible-only --enable-offline-load-stale-cache --enable-app-window-controls --enable-embedded-extension-options --enable-experimental-extension-apis --enable-scripts-require-action --enable-nacl --enable-nacl-debug --enable-streamlined-hosted-apps --enable-web-based-signin --javascript-harmony --out-of-process-pdf --enable-delegated-renderer --enable-impl-side-painting --num-raster-threads=4 --enable-gpu-rasterization --channel=5035.27.2136067136

Even yet another idea is maybe to write a small widget using python's tkinter and the webrowser modules, it could even get its input from the clipboard.

this command could be a work around solution too:

 python -m webbrowser -t "http://ip.ip.ip.ip:portport/file/"

Another option yet is to use The Omnibox API and embed a custom omnibox in a simple webpage. Here are the omnibox api ready made samples.

Schopenhauer
  • 1,132
  • 8
  • 8
  • Isn't `chrome://omnibox/` just going to show me recent results / behaviour of the omnibox, but doesn't actually allow me to change settings? – kontur Feb 16 '15 at 09:16
  • If you build it from source most features are enabled by flags. This is a gui to them. – Schopenhauer Feb 17 '15 at 06:06
  • Thanks for expanding on your answer. You didn't however answer my comment any more. Doesn't the `chrome://omnibox/` simply show me how omnibox behaves, instead of actually making changes to it? – kontur Feb 17 '15 at 07:26
  • It should actually change this unwanted behavior. – Schopenhauer Feb 17 '15 at 08:43
  • Hmmm, okay, I might have played around too much with this and got confused. Thanks for the repeated answer. – kontur Feb 17 '15 at 09:41
3

You can avoid this by adding a "/" at the end of the URL http://0.0.0.0:5000/api/

or

You can try to add a null search engine with a URL of http://%s and null keyword.

Go to the search engine settings:

  • Open Settings.
  • Click Manage search engines
  • At the bottom of the Other search engines section add a new search engine. Screenshot of Settings
  • 2
    Appending a `/` to the end is not always an options, depending on the URL scheme of what I try to access – kontur Feb 09 '15 at 14:23
  • Actually, Yes! forgot to mention. – Juan Buhagiar Feb 11 '15 at 08:27
  • This doesn't work for me. Maybe I am doing something wrong? When I set it to this default search engine and start typing an address I don't have in my history but know exists (local ip), then press enter, nothing happens. Also, the "null" search doesn't come up for that address. Aside from that, it is also very inconvenient to switch the default search engine, as this will not work in a setup where I browse and develop in the same browser. Not a solution for me, sorry. – kontur Feb 13 '15 at 11:17
1

Using @Juan Buhagiar answer as a starting point, I added your URL as the URL of a default search engine:


Other search engines

| MyAPI | 0.0.0.0 | http://0.0.0.0:5000/api/venues/show/45/20/cafes?rubbish=%s |

That just worked. The only drawback is that you get a redundant query to your request:

http://0.0.0.0:5000/api/venues/show/45/20/cafes?rubbish=0.0.0.0%3A5000%2Fapi%2Fvenues%2Fshow%2F45%2F20%2Fcafes%2F

instead of plain:

http://0.0.0.0:5000/api/venues/show/45/20/cafes

So as long as it does not conflict with your own GET, you can just ignore it.

ptrk
  • 1,800
  • 1
  • 15
  • 24
0

Simplest way - Add a bookmark with your desired address. This time it will not goto search. This may not be useful if you have to change variables regularly, which was not my case.

This is helpful if you do not want it to disable omnibar search completely since it is quite a useful feature.

aarjithn
  • 1,151
  • 8
  • 20
  • Right click bookmark bar -> Add Page. If bookmark bar is not visible, Menu icon -> Bookmarks -> Show Bookmarks Bar – aarjithn May 31 '15 at 18:09