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

后端 未结 12 1286
南方客
南方客 2020-11-30 12:10

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 t

12条回答
  •  野性不改
    2020-11-30 12:58

    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/

提交回复
热议问题