[ColdBox 4.1] Caching JS files

13 views
Skip to first unread message

Chad Baloga

unread,
Nov 2, 2015, 8:04:32 AM11/2/15
to ColdBox Platform
We are using a POST to populate the main content area of our page which uses an event to get the view/layout etc.  There are JS and CSS includes in our layouts.  Every time the main content is reloaded, the JS files appear to show up as their own GET requests after the HTML POST with the underscore "cache buster" parameter.  Is there a way to have these requests not cache or is there an overall different way to accomplish what we are doing?   

This is similar to our function to handler where we have a event.setView:

$.post(uri_to_hander,
function(data){
$("#contentArea")
.css('background-color','white')
.css('overflow','scroll')
.html(data);
}
);

Andrew Scott

unread,
Nov 2, 2015, 1:59:57 PM11/2/15
to col...@googlegroups.com
The only thing that enters my head is to look at the headers of the Ajax call and see what they say, it might be that Ajax ignores or setting the cache headers wrong. But I would assume they would adhere to them personally. If that is the case, try setting your own cache headers and see if that makes a difference.

Regards,
Andrew Scott
WebSite: http://www.andyscott.id.au/


--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coldbox/10379b59-2ddd-4b7e-bd55-8d1ca5692ac1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages