Best way to include unobtrusive information on a web page

前端 未结 7 957
栀梦
栀梦 2021-02-06 16:34

So I\'ve got some scripts I\'ve written which set up a Google map on my page. These scripts are in included in the of my page, and use jQuery to build

相关标签:
7条回答
  • 2021-02-06 17:32

    The data is always going to be visible to someone who wants to get to it. Trying to hide it will just slow down those who arn't adept at it. My suggestion is don't use XHR as that is slow for a lot of people and always adds time to the page load, something you should try to minimize. use an array.

    var myArray = new Array();  
    myArray.push([1.000,1.000,"test1"]);  
    myArray.push([2.000,2.000,"test2"]);  
    myArray.push([3.000,3.000,"test3"]);  
    for(i=0;i<myArray.length;i++){  
        yourGoogleMapsAPICall(myArray[i][0],myArray[i][1],myArray[i][2]);  
    }  
    

    sort of thing ya?

    0 讨论(0)
提交回复
热议问题