1

I'm creating a website and it works fine. I cannot find any issues on html or javascript and dreamweaver is not showing errors either. But in chrome console there is about 71 errors.

XMLHttpRequest cannot load https://www.gstatic.com/mapspro/_/js/k=mapspro.gmeviewer.en.YzFInGpetnI.O/m=ws9Tlc/rt=j/rs=AItRSTMqeQtfsBrXsETZv9SFkl2pukGigw. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://www.google.com' is therefore not allowed access.

and

GET https://khms1.googleapis.com/kh?v=178&hl=en&x=3034197&y=2015537&z=22&token=111350 404 (OK)

these two errors keep repeating.

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta charset="utf-8">
        <meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" />
        <meta name="format-detection" content="telephone=no" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />

        <title>||home||</title>

        <link href="css/jquery-ui.min.css" rel="stylesheet" type="text/css"/>
        <link href="css/bootstrap.css" rel="stylesheet" type="text/css"/>
        <link rel="stylesheet" type="text/css" href="css/set1.css" />
        <link href="css/slider.css" rel="stylesheet" type="text/css"/>
        <link href="css/home-tours.css" rel="stylesheet" type="text/css"/>
        <link href="css/activity.css" rel="stylesheet" type="text/css"/>
        <link href="css/master.css" rel="stylesheet" type="text/css"/>
        <link href="css/gallery.css" rel="stylesheet" type="text/css"/>

        <script src="js/jquery-1.11.2.min.js" type="text/javascript"></script>
        <script src="js/jquery-ui.min.js"  type="text/javascript"></script>
        <script src="js/bootstrap.min.js"  type="text/javascript"></script>
        <script type="text/javascript" src="js/jquery.livequery.js"></script>
    </head>

This is my header HTML. Can anyone help me to understand this I really appreciate help.

Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339
  • JavaScript cannot make requests to third party domains due to the [Same Origin Policy](http://en.wikipedia.org/wiki/Same-origin_policy), unless JSONP or CORS are supported by the request recipient. In this case it appears they are not. You need to use a server-side proxy to make the request for you – Rory McCrossan Jul 29 '15 at 10:16
  • I would also suggest you always use a browser to test with. Using Dreamweaver alone is unreliable. – Rory McCrossan Jul 29 '15 at 10:18
  • 1
    @Rory McCrossan I'm using about 30 google maps in my site. Is that got to do something with this? –  Jul 29 '15 at 10:20

1 Answers1

0

Access-Control-Allow-Origin

Is a header tag that you can set server side, to allow the webpage to fetch content from a different server (its a security issue to prevent cross site scripting).

See this SO question for how to settAccess-Control-Allow-Origin Multiple Origin Domains?

GET https://khms1.googleapis.com/kh?v=178&hl=en&x=3034197&y=2015537&z=22&token=111350 404 (OK)

Just means that the URL provided is not found HTTP 404 means NOT FOUND

Community
  • 1
  • 1
Richard87
  • 1,592
  • 3
  • 16
  • 29
  • 1
    I will look into that thank you. By the way is there issue you can find in frontend part with this errors? –  Jul 30 '15 at 03:08
  • 1
    Next to the error in the console there is a small arrow/triangle, if you click this you will get the stackttace of the error :-) – Richard87 Jul 30 '15 at 07:36