Re: view caching and progressive enhancement/ajax
I'm surprised nobody's encountered this before!? My best solution so far is to create alternate URLs via routes, so all links likely to be ajax will have a different cache file than those likely to be traditional HTTP. I'm pretty sure though that my progressively enhanced don't degrade very gracefully - without JS, an ajax-optimised version of the cached page will be returned in most instances :( On Oct 7, 3:58 pm, the_woodsman [EMAIL PROTECTED] wrote: Hi guys, It took me a while to work out why my conventional links were returning ajax style, layout-less pages! - I have a page (in views/pages/) that has tabs, each of these tabs causes a page refresh - I use JQuery to hijack the links to make them ajax, so Cake returns the view without the layout - Other pages of the site link directly to specific tabs So, If the request that triggers a view cache refresh happens to be an ajax one, then the cache doesn't include the layout. That means that my conventional direct links to these pages will returned the cached, ajax optimised versions!!! Is there an elegant way to deal with this? Cheers! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: view caching and progressive enhancement/ajax
I set up caching the other day in a couple of apps, one is being made offline using ajax I was worried that I would get what you have described but I found that with parseExtensions cache files get created for both the standard full view and ajax alternatives (using ajax layout) I was delighted to see this working so nicely - though I do some bugs within this app (I guess this are problems of my own creation - some .ajax are made with the full layout, once these are weeded out I'll have things working as intended) So are you using parseExtensions? In a previous app (without caching I switched the layout based on a format param passed to the url set in my jquery hijack) I think I migth get issues if caching were used in this case 2008/10/15 the_woodsman [EMAIL PROTECTED] I'm surprised nobody's encountered this before!? My best solution so far is to create alternate URLs via routes, so all links likely to be ajax will have a different cache file than those likely to be traditional HTTP. I'm pretty sure though that my progressively enhanced don't degrade very gracefully - without JS, an ajax-optimised version of the cached page will be returned in most instances :( On Oct 7, 3:58 pm, the_woodsman [EMAIL PROTECTED] wrote: Hi guys, It took me a while to work out why my conventional links were returning ajax style, layout-less pages! - I have a page (in views/pages/) that has tabs, each of these tabs causes a page refresh - I use JQuery to hijack the links to make them ajax, so Cake returns the view without the layout - Other pages of the site link directly to specific tabs So, If the request that triggers a view cache refresh happens to be an ajax one, then the cache doesn't include the layout. That means that my conventional direct links to these pages will returned the cached, ajax optimised versions!!! Is there an elegant way to deal with this? Cheers! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
view caching and progressive enhancement/ajax
Hi guys, It took me a while to work out why my conventional links were returning ajax style, layout-less pages! - I have a page (in views/pages/) that has tabs, each of these tabs causes a page refresh - I use JQuery to hijack the links to make them ajax, so Cake returns the view without the layout - Other pages of the site link directly to specific tabs So, If the request that triggers a view cache refresh happens to be an ajax one, then the cache doesn't include the layout. That means that my conventional direct links to these pages will returned the cached, ajax optimised versions!!! Is there an elegant way to deal with this? Cheers! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---