Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating Google Chrome shortcut with --disable-web-security

Tags:

I am trying to access some local files via jqueryMobile, it works fine in Firefox and IE but Chrome gives a security exception. I can open Chrome in disabled security mode to access local files by using

C:\Program Files\Chrome\Chrome.exe --disable-web-security

or run it via this

chrome.exe --disable-web-security

but is there any way I can create a shortcut on desktop that will always open Chrome in disabled security mode?

like image 728
Addy Avatar asked Jun 18 '14 15:06

Addy


People also ask

How do I run Chrome insecure mode?

Right-click the Google Chrome desktop icon (or Start Menu link). Select Properties. At the end of the existing information in the Target field, add: " --allow-running-insecure-content" (There is a space before the first dash.) Click OK.


2 Answers

Just clone the shortcut for chrome you have on your desktop, and then in the shortcut properties add the parameter --disable-web-security (and --user-data-dir) at the end of chrome executable path

e.g

"C:\Program Files\Google\Chrome\Application\chrome.exe" --disable-web-security --user-data-dir="C:\tmpChromeSession"

Edit #1 : I changed google chrome path, the old one was not correct. I just tried it on XP with fresh Chrome installed, but i got a error message that this flag is not supported.

Edit #2 : http://peter.sh/experiments/chromium-command-line-switches/

like image 106
Rabin Avatar answered Sep 30 '22 11:09

Rabin


First search Run, then try this:

chrome.exe --user-data-dir="C:/Chrome dev session" --disable-web-security 
like image 41
user7527943 Avatar answered Sep 30 '22 09:09

user7527943