0

In a pinch, we're trying to convert a bunch of production UI files into something that we can zip up and send to someone else to view locally via their local hard drive.

We're trying to avoid messing with the current jQuery as much as we can.

Right now, the pages are using some JS includes of sorts such as:

#('idHere').load('some/local/htmlfile.html')

This, alas, triggers a console error of:

Cross origin requests are only supported for protocol 
schemes: http, data, chrome-extension, https, 
chrome-extension-resource.

Is there a way around the cross origin issue when requesting files from the local drive (ie, the file: protocol?)

DA.
  • 36,871
  • 47
  • 133
  • 201

1 Answers1

0

you can start chrome with --disable-web-security parameter that would do it.

Here is the full explanation Disable same origin policy in Chrome

Community
  • 1
  • 1
tinker
  • 705
  • 4
  • 12
  • Is there any way to get this working by default? The catch is that these files are being sent out to highly NONtechnical folks to run locally (it's a user testing session). If this simply can't be done locally, we're just going to have to go the long route and pull out all of the .load calls and do a lot of cutting-and-pasting. – DA. Dec 05 '14 at 20:35
  • well by default no.. I think you can send the customized chrome shortcut with custom parameters to the user.. – tinker Dec 05 '14 at 20:43