javascript - Is there a way to load a json file along with all the other js files? -
this question has answer here:
i"m wondering if there's way load json file without having use ajax jquery. have json file in folder, seem bit wasteful load file after else loaded ajax. folders this:
css/ font/ html/ img/ config.json
so have data available js available instead of having use jquery or method fetch later. in advance. (without declaring variable no var foo = {...}
)
add variable assignment json file , use standard js script tag.
Comments
Post a Comment