I have read this and this about techniques to pass data from PHP to Javascript, however I am worried about memory and variable size limits in javascript.
Basically I am passing chunks of HTML from PHP to Javascript so that Jquery can output dynamically page sections, but these chunks are getting big (currently a dozen variables are holding some 108k of data totally), so I was wondering what could be a safe and efficient alternative, possibly avoiding Ajax as for performance issues.
At the moment data is passed "echoing" from PHP to HTML/Javascript (not very elegant, I know).
Maybe I could save into files these page chunks and use jQuery .load?
What do you think?