I have a widget which has to fetch json data. The json data will change...

I have two options to include the content in the boot-loader file.

**-----------------------------------------------------------------------------------------------------------**

* Include a javascript file with the data and a function to process that data as the file is included completely.

**OR**

* Use ajax to get the json data.

**-----------------------------------------------------------------------------------------------------------**

1. Which has better interface?
2. Which is easier to code?
3. Which is less error prone?
4. Which is more compatible to browsers?
5. Which is lighter and faster to execute on the client side?