Okay top of my head thinking will lead me to do the following
algorithim:

1- Before returning the JSON response check if the script or
stylesheet is already in the page-dependencies if it is eliminate the
script/stylesheet from being sent since the bundle has already
included it
2- By adding a js function on the client side we can check the json
response and if the stylesheet/script has already been added then do
not add it again.

The above will make sure that in webpages that are heavy in both css &
javascript (much of Web 2.0) we do not keep requesting the client to
reload the same page and more importantly global variables/functions
are not over-written.

What do you think? Should I go ahead and implement this?

Mackram

On Jul 5, 2:29 pm, "Leslie P. Polzer" <[email protected]>
wrote:
> Mackram wrote:
>
> > Okay I did that but found myself really surprised when I noticed that
> > clicking on the Add button in say the companies page of weblocks-demo
> > included the css and the doms all over again. Why is that and where to
> > find it?
>
> The code responsible for sending deps on AJAX requests is
> in RENDER-DEPENDENCY-IN-AJAX-RESPONSE, which is called
> by the default RENDER-WIDGET method (src/widgets/widget/widget.lisp).
>
> We just send all deps for widgets marked dirty in the AJAX
> request to ensure that the client has them.
>
> This is crude since it doesn't take into account dependencies
> that are already existing. Plus it doesn't work in all cases
> (<script src="..."/> comes to mind, and there are other
> subtleties), but all in all it does more good than harm,
> especially as far as CSS is concerned.
>
> But feel free to propose a better mechanism.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"weblocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/weblocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to