Create a Google Chrome shortcut with --disable-web-security

I am trying to access some local files through jqueryMobile, it works fine in forefox and IE, but chrome provides a security exception. I can open chrome disabled security mode to access local files using

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

or run it through

chrome.exe --disable-web-security

but is there a way to create a shortcut on dsktop that will always open chrmoe in disabled security mode.?

+9
source share
7 answers

Just clone the shortcut for Chrome on the desktop, and then in the shortcut properties add the parameter --disable-web-security(s --user-data-dir) at the end of the path to the Chrome executable.

eg

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

# 1: Google Chrome, . XP Chrome, , .

№ 2: http://peter.sh/experiment/chromium-command-line-switches/

+15

Run, :

chrome.exe --user-data-dir="C:/Chrome dev session" --disable-web-security 
+6

, --disable-web-security, -user-data-dir : "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security --user-data-dir

+5

- -web-

+2
source

You must use the following flags

--disable-web-security 
--user-data-dir

but also pass the path to your chrome user profile

See this:

https://productforums.google.com/forum/#!topic/chrome/9nHBcjNW384 https://bugs.chromium.org/p/chromium/issues/detail?id=575690

So now I have the top pass of my path to the user profile:

C:\Users\user\projects\project>"C:\Program Files (x86)\Google\Chrome\App
lication\chrome.exe" --disable-web-security --user-data-dir="C:\Users\user\A
ppData\Local\Google\Chrome\User Data\Default"
+2
source

now this

--disable-web-security --user-data-dir = "c: / someFolderName"

+1
source

For Windows10:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security
0
source

Source: https://habr.com/ru/post/1545105/


All Articles