I have a JS file on site A which reads a few parameters from a short text file on site B.
The call is made through:
var theFile = getFile("http://www.mySiteB.com/theTextFile.txt");
var lines = theFile.split("\
var var1 = lines;
var var2 = lines;
var var3 = lines;
The problem is that this takes a long time. I would really like to speed this up. For example - I thought of using a direct IP address, so that there won't be any need a DNS server (using
var theFile = getFile("http://18.104.22.168/~myUsername/mySiteB/theTextFile.txt");
) but this would expose me to hackers as it would make my Hostgator username visible. According to HG support the above format is the only way to access my subsite via direct IP.
Any ideas on how to speed this up, either by bypassing DNS (but without exposing username) or by offering another way of reading data across sites?
This is really important for me!