如何防止此广告网络http请求?以及如何插入请求?

时间:2015-07-08 12:01:55

标签: javascript security http

我有一个带有javascript的简单网页,它向服务器发送各种请求。但在此之间,我正在接收来自我的网站的网络请求,我不负责。

我的HTML页面

<div class="container">
  <div class="row">
   <div>
      <div class="row">
        <div class="col-md-6 ">
          <div class="form-group">
            <label for="inputDate" class="col-sm-1 control-label">Date</label>
            <div class="col-sm-6">
              <input type="date" class="form-control" id="inputDate" name="inputDate" placeholder="Date" required>
            </div>
            <button type="submit" class="btn btn-primary get" onclick="getdata()">Get</button>
          </div> 
        </div>
       </div>
    </div>
  </div>
  <div class="row">
    <div class="panel panel-default">
      <!-- Default panel contents -->
      <div class="panel-heading">Dispatch Overview</div>
      <div class="panel-body">
        <p>...</p>
      </div>



       <!-- Table -->
        <table id="dispatchOverviewTable" class="table table-striped">
      <thead>
        <tr>
          <th>Sr.Nos</th>
          <th>Item</th>
          <th>Qty</th>
          <th>Kg</th>


        </tr>
      </thead>
      <tbody>

      </tbody>
      </table>


      <!-- Table -->
        <table id="dispatchDetailTable" class="table table-striped">
      <thead>
        <tr>
          <th>Sr.Nos</th>
          <th>Id</th>
          <th>Item</th>
          <th>Qty</th>
          <th>Kg</th>
          <th>Account</th>

        </tr>
      </thead>
      <tbody>

      </tbody>
      </table>
    </div>
  </div>

我的Javascript:

 function getdata()
  { 
    var totalFeed;
    console.log('in function getdata');
    var data=$('#inputDate').val();
    console.log(data);
    $.get( '/index.php/async/getDispatchDetails/'+data,function( data ) {

      console.log(data.dispatchdata); 
      console.log(data.itemdata); 

      $('#dispatchDetailTable > tbody > tr').remove();

      for (var i = 1; i <= data.dispatchdata.size; i++) {
        console.log("inside for loop");
        var row = "";
        row = "<tr><td>" + i + "</td><td>"+ 
        data.dispatchdata[i].dispatchid +"</td><td>"+
        data.dispatchdata[i].itemname +"</td><td>"+
        data.dispatchdata[i].quantity + "</td><td>" +
        data.dispatchdata[i].weight + "</td><td>" +
        data.dispatchdata[i].accountname + "</td><td>" +

      "</td></tr>";
      $('#dispatchDetailTable > tbody:last').append(row);

    }



  });
}

我的浏览器控制台:  未知部分

 *************** Muted gameContent
VM16571:1 [Wed Jul 8 17:10:51 GMT+0530 2015] (#0): event:[Event type="complete" bubbles=false cancelable=false eventPhase=2]
vpc.xml:1 GET http://vpc.altitude-arena.com/vpc.xml?uid=1jmf6b3e9c817755&page_url=http%3A…a_file_title=[REPLACE]&media_description=[REPLACE]&media_file_id=[REPLACE] 404 (Not Found)
vast.yashi.com/crossdomain.xml:1 GET http://vast.yashi.com/crossdomain.xml net::ERR_EMPTY_RESPONSE
VM16601:1 [Wed Jul 8 17:10:55 GMT+0530 2015] (#0): adLoaded[LiveRailEvent type="initComplete" adMap=[object Object]]
VM16602:1 [Wed Jul 8 17:10:55 GMT+0530 2015] (#0): START
vpc.xml:1 GET http://vpc.altitude-arena.com/vpc.xml?uid=ql6df2bd02fd5b45&page_url=[REPLAC…a_file_title=[REPLACE]&media_description=[REPLACE]&media_file_id=[REPLACE] 404 (Not Found)
VM16710:1 [Wed Jul 8 17:11:15 GMT+0530 2015] (#0): destroy: false
adaptvInfo.js:1 Uncaught Error: Error: An invalid exception was thrown.window.adaptvInfo.fraudScoreCallback @ adaptvInfo.js:1window.(anonymous function) @ adaptvInfo.js:1R.stringToFn @ bapi?anid=6058&ias_callback=adaptv1436355672623&pubid=b4.epicplay.com&placementId=498506:194na.wrap.window.(anonymous function) @ bapi?anid=6058&ias_callback=adaptv1436355672623&pubid=b4.epicplay.com&placementId=498506:174(anonymous function) @ dbapi?ias_callback=__IntegralAS_371ff0f1256611e58a6b002590882ecc_1781&anid=6058&pubid=b4.epicplay.c…:1
vast-rtb.js?1:1 allVastAdsCompleted: NaN; Load Errors: 0

2 个答案:

答案 0 :(得分:0)

这与您的网站无关,但与您的操作系统上运行的某些插件/应用程序无关,如果您愿意,可能是广告软件或病毒,可能是因为安装了一些免费软件程序,如youtube到mp3转换器或类似的东西。

为了确认这一点,我建议您在虚拟机或其他计算机上测试您的网站。

答案 1 :(得分:0)

添加“Fair AdsBlocker”Chrome扩展程序将被清除。