talk@lists.collectionspace.org

WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org

View all threads

caching controls on ajax calls?

JM
Jesse Martinez
Thu, Aug 2, 2012 5:30 PM

Is there a way to turn on caching on ajax calls for static files in CSpace?

I'm seeing a lot of static template html files that aren't cacheable
because of a time stamp string parameter appended to the file name,
e.g. collectionspace/ui/mmi/html/pages/CreateNewTemplate.html?_=1343927892923

Same with core-messages.properties (although this file doesn't have a
content-type value in the response header, which is a different
story...)

  • Jesse
Is there a way to turn on caching on ajax calls for static files in CSpace? I'm seeing a lot of static template html files that aren't cacheable because of a time stamp string parameter appended to the file name, e.g. collectionspace/ui/mmi/html/pages/CreateNewTemplate.html?_=1343927892923 Same with core-messages.properties (although this file doesn't have a content-type value in the response header, which is a different story...) - Jesse
RL
Ray Lee
Thu, Aug 2, 2012 6:15 PM

This is precisely what PAHMA-466 covers: http://issues.collectionspace.org/browse/PAHMA-466

I haven't had a chance to look into it, but it doesn't make sense to me that these files are fetched over the network every time. They're basically static.

Ray

On Aug 2, 2012, at 10:30 AM, Jesse Martinez wrote:

Is there a way to turn on caching on ajax calls for static files in CSpace?

I'm seeing a lot of static template html files that aren't cacheable
because of a time stamp string parameter appended to the file name,
e.g. collectionspace/ui/mmi/html/pages/CreateNewTemplate.html?_=1343927892923

Same with core-messages.properties (although this file doesn't have a
content-type value in the response header, which is a different
story...)

  • Jesse

Work mailing list
Work@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/work_lists.collectionspace.org

This is precisely what PAHMA-466 covers: http://issues.collectionspace.org/browse/PAHMA-466 I haven't had a chance to look into it, but it doesn't make sense to me that these files are fetched over the network every time. They're basically static. Ray On Aug 2, 2012, at 10:30 AM, Jesse Martinez wrote: > Is there a way to turn on caching on ajax calls for static files in CSpace? > > I'm seeing a lot of static template html files that aren't cacheable > because of a time stamp string parameter appended to the file name, > e.g. collectionspace/ui/mmi/html/pages/CreateNewTemplate.html?_=1343927892923 > > Same with core-messages.properties (although this file doesn't have a > content-type value in the response header, which is a different > story...) > > - Jesse > > _______________________________________________ > Work mailing list > Work@lists.collectionspace.org > http://lists.collectionspace.org/mailman/listinfo/work_lists.collectionspace.org
RL
Ray Lee
Thu, Aug 2, 2012 6:17 PM

Specifically, I'm concerned about core-messages.properties, and anything with a .html extension (header, footer, record editor templates, etc.). There are a lot of these requests being made.

Ray

On Aug 2, 2012, at 11:15 AM, Ray Lee wrote:

This is precisely what PAHMA-466 covers: http://issues.collectionspace.org/browse/PAHMA-466

I haven't had a chance to look into it, but it doesn't make sense to me that these files are fetched over the network every time. They're basically static.

Ray

On Aug 2, 2012, at 10:30 AM, Jesse Martinez wrote:

Is there a way to turn on caching on ajax calls for static files in CSpace?

I'm seeing a lot of static template html files that aren't cacheable
because of a time stamp string parameter appended to the file name,
e.g. collectionspace/ui/mmi/html/pages/CreateNewTemplate.html?_=1343927892923

Same with core-messages.properties (although this file doesn't have a
content-type value in the response header, which is a different
story...)

  • Jesse

Work mailing list
Work@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/work_lists.collectionspace.org

Specifically, I'm concerned about core-messages.properties, and anything with a .html extension (header, footer, record editor templates, etc.). There are a lot of these requests being made. Ray On Aug 2, 2012, at 11:15 AM, Ray Lee wrote: > This is precisely what PAHMA-466 covers: http://issues.collectionspace.org/browse/PAHMA-466 > > I haven't had a chance to look into it, but it doesn't make sense to me that these files are fetched over the network every time. They're basically static. > > Ray > > > On Aug 2, 2012, at 10:30 AM, Jesse Martinez wrote: > >> Is there a way to turn on caching on ajax calls for static files in CSpace? >> >> I'm seeing a lot of static template html files that aren't cacheable >> because of a time stamp string parameter appended to the file name, >> e.g. collectionspace/ui/mmi/html/pages/CreateNewTemplate.html?_=1343927892923 >> >> Same with core-messages.properties (although this file doesn't have a >> content-type value in the response header, which is a different >> story...) >> >> - Jesse >> >> _______________________________________________ >> Work mailing list >> Work@lists.collectionspace.org >> http://lists.collectionspace.org/mailman/listinfo/work_lists.collectionspace.org > > > _______________________________________________ > Talk mailing list > Talk@lists.collectionspace.org > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
JM
Jesse Martinez
Thu, Aug 2, 2012 6:43 PM

Thanks, Ray. I'm thinking it's to do with how fluid makes the ajax
calls in the first place where it's assumed no file should be cached?

You might also want to check in on core-messages.properties lacking a
content-type value. This prevents it from receiving a cache control
header in the response header from Tomcat. (If it wasn't getting the
UI non-cache treatment, of course.) Assuming there is a filter-mapping
url pattern sub-element for /ui/pahma/bundle/*. I don't know if the
offline application cache will work on this file sans content-type,
either.

  • Jesse

On Thu, Aug 2, 2012 at 2:17 PM, Ray Lee rhlee@berkeley.edu wrote:

Specifically, I'm concerned about core-messages.properties, and anything with a .html extension (header, footer, record editor templates, etc.). There are a lot of these requests being made.

Ray

On Aug 2, 2012, at 11:15 AM, Ray Lee wrote:

This is precisely what PAHMA-466 covers: http://issues.collectionspace.org/browse/PAHMA-466

I haven't had a chance to look into it, but it doesn't make sense to me that these files are fetched over the network every time. They're basically static.

Ray

On Aug 2, 2012, at 10:30 AM, Jesse Martinez wrote:

Is there a way to turn on caching on ajax calls for static files in CSpace?

I'm seeing a lot of static template html files that aren't cacheable
because of a time stamp string parameter appended to the file name,
e.g. collectionspace/ui/mmi/html/pages/CreateNewTemplate.html?_=1343927892923

Same with core-messages.properties (although this file doesn't have a
content-type value in the response header, which is a different
story...)

  • Jesse

Work mailing list
Work@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/work_lists.collectionspace.org

Thanks, Ray. I'm thinking it's to do with how fluid makes the ajax calls in the first place where it's assumed no file should be cached? You might also want to check in on core-messages.properties lacking a content-type value. This prevents it from receiving a cache control header in the response header from Tomcat. (If it wasn't getting the UI non-cache treatment, of course.) Assuming there is a filter-mapping url pattern sub-element for /ui/pahma/bundle/*. I don't know if the offline application cache will work on this file sans content-type, either. - Jesse On Thu, Aug 2, 2012 at 2:17 PM, Ray Lee <rhlee@berkeley.edu> wrote: > Specifically, I'm concerned about core-messages.properties, and anything with a .html extension (header, footer, record editor templates, etc.). There are a lot of these requests being made. > > Ray > > > On Aug 2, 2012, at 11:15 AM, Ray Lee wrote: > >> This is precisely what PAHMA-466 covers: http://issues.collectionspace.org/browse/PAHMA-466 >> >> I haven't had a chance to look into it, but it doesn't make sense to me that these files are fetched over the network every time. They're basically static. >> >> Ray >> >> >> On Aug 2, 2012, at 10:30 AM, Jesse Martinez wrote: >> >>> Is there a way to turn on caching on ajax calls for static files in CSpace? >>> >>> I'm seeing a lot of static template html files that aren't cacheable >>> because of a time stamp string parameter appended to the file name, >>> e.g. collectionspace/ui/mmi/html/pages/CreateNewTemplate.html?_=1343927892923 >>> >>> Same with core-messages.properties (although this file doesn't have a >>> content-type value in the response header, which is a different >>> story...) >>> >>> - Jesse >>> >>> _______________________________________________ >>> Work mailing list >>> Work@lists.collectionspace.org >>> http://lists.collectionspace.org/mailman/listinfo/work_lists.collectionspace.org >> >> >> _______________________________________________ >> Talk mailing list >> Talk@lists.collectionspace.org >> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >