Login to download the latest version of Mint and your favorite Pepper, purchase additional licenses, or post in the Forum. Don't have an account? Create one!

In Partnership with Media Temple

Mint Forum

Issue with Mint javascript file and caching

I’ve been working to speed up my site over the past few days. When running Yslow! on my Mint-enabled blog, it states that the Mint javascript files (which can’t be served from the CDN because when I try to do so, Mint stops recording visits) have a Expires Header set to a date in the past (1997/07/26).

I’ve done a screenshot of the relevant section of the Yslow! results page which shows the issue.

What I understand this to mean is that client browsers are told to load the script every time they access any one of the blog’s pages, regardless of the number of times they’ve accessed the javascript file already.

Is this correct? And if so, is there a reason for it?

Shaun Inman
Mint/Pepper Developer
Posted on Mar 03, '10 at 09:11 am

Mint requires a unique checksum that is generated for every request to prevent referrer spam. The Mint JavaScript cannot be cached.

@Shaun Inman: Yes, I figured that must be the case. As I’m caching everything else, including the database, maybe it would make sense for Mint to have a separate, uncached database?

Shaun Inman
Mint/Pepper Developer
Posted on Mar 08, '10 at 08:49 am

You should not be caching the MInt database. Mint is primarily a WRITE application. Every hit on your site needs to write to it. Only you READ from it when viewing your stats. Caching the database makes absolutely no sense.

You must be logged in to reply. Login above or create an account