[dba-Tech] Google Chrome: Error 'Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.'
Jim Lawrence
accessd at shaw.ca
Sun Jun 7 00:51:18 CDT 2015
Hi Shamil:
I am glad to hear that at one (two) browsers are happy.
Just for interest sake what line of code does Chrome fail at?
I do not know if your issue has anything to do with following. A few years ago (four) both FF and Chrome would fail because of certain cross-domain errors. Since then FF has been fixed.(?) but Chrome has not been. I think it is because each browser interprets what represents a cross-domain violation differently. Maybe the following Stackoverflow post may provide some insight as the described error was resolvable via coding using the JSONP method.
http://stackoverflow.com/questions/4193429/cross-domain-call-not-working-in-firefox-and-chrome
...and...
http://api.jquery.com/jQuery.getJSON
Jim
----- Original Message -----
From: "Salakhetdinov Shamil" <mcp2004 at mail.ru>
To: "Discussion of Hardware and Software issues" <dba-tech at databaseadvisors.com>
Sent: Saturday, June 6, 2015 11:24:15 AM
Subject: Re: [dba-Tech] Google Chrome: Error 'Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.'
Hi Jim --
All the links in the "HTML + js" app I'm cooking here are relative.
FF works with this HTML app and ignores "cross domain" requests' issues (there are no cross domain requests in this app AFAIU).
It's a kind of local HTML app for me - and FF handles it smoothly.
But Google Chrome doesn't.
I will use FF, no problem. Just thought if there could be a simple trick to make Google Chrome working with the same HTML app.
Thank you.
-- Shamil
Saturday, June 6, 2015 11:45 AM -06:00 from Jim Lawrence <accessd at shaw.ca>:
>Hi Shamil:
>
>Oh dear... I had hoped that we were able to get away from all these browser disparities.
>
>I have run into this "cross domain" problem so many times. It is a fairly recent issue supposedly to guard against cross site attacks. It seems that each browser has it own interpretation of what represents a domain's range.
>
>When you are running everything from Localhost domains are not a problem but when the site is moved to a webserver then how relative and absolute links are managed become an issue. Hard coding for internal links usually works but if an absolute link is built in code, like in a variable, then interpretation becomes browsers dependent. There is three ways around this; one, build all absolute links via server side code, two, use only relative links and three, assuming you have a server BE in place, use the server's configuration file to set the base parameters.
>
>My choice, as using the server to handle things that are really FE issues is a waste of resources, is to write all internal site code as relative links. In 2008, I had to completely rewrite the DBA sites code as that is when the browser change took place and I didn't want that little site to be server dependent.
>
>Jim
>
>----- Original Message -----
>From: "Salakhetdinov Shamil" < mcp2004 at mail.ru >
>To: "Discussion of Hardware and Software issues" < dba-tech at databaseadvisors.com >
>Sent: Saturday, June 6, 2015 9:39:30 AM
>Subject: Re: [dba-Tech] Google Chrome: Error 'Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.'
>
> Hi Jim --
>
>As I have noted FireFox works well with the same html + js-es + json opened directly from local disk using File -> Open.
>
>Have a look: http://tinyurl.com/oxpdbf6
>
>But I wanted to have Google Chrome to be working as smoothly as FF (or Safari). I don't even mention IE...
>
>Thank you.
>
>-- Shamil
<<< skipped >>>
>
_______________________________________________
dba-Tech mailing list
dba-Tech at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-tech
Website: http://www.databaseadvisors.com
More information about the dba-Tech
mailing list