For people who used php, what I am asking for is a javascript heredoc.

On 6/8/07, Mandy Singh <[EMAIL PROTECTED]> wrote:

Hello Everyone,

My question might not be very jquery specific, but since all the brains
are here, I thought of tossing it up for some ideas.

I want to separate presentation from my data (on client side).

Eg. If I request index.php from the server, it's comprised of -

  1) markup (divs, tables, etc)
  2) data

Now what I want to do is that next time user requests index.php, I should
be able to almost immediately serve the entire UI from cache (ie, if I could
write it to a javascript file that is cached - expires header, etc) and make
a request only for data. Like, check if user is coming with a full cache, if
yes, then only get data (as json objects) else get the entire page with data
and presentation markup.

Wrting the entire presentation (divs, tables, etc) into javascript using
document.writes is painful.

Other ways could be to create a template for that markup and just write
that to the js file and keep applying the result set to it and writing the
innerHTML of the containers on the page using that template.

What do you guys suggest? How do you / if you tackle this problem?

For me dialup speed (loading time) is the key.

Thanks,
Mandy.

Reply via email to