Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got Django running and caching into Memcached. I have some ajax actions on a page and when those actions are performed, and the browser refreshd, the CSS and JS files are no where to be found. They are gone in Firebug and the site is displayed with just the objects without any styling.

I turned off memcached and was unable to replicate the issue. I'm at a loss here, have you guys heard of anything like this with memcached before?

share|improve this question
up vote 1 down vote accepted

Are you caching entire Django views in memcached? If so, are you also caching the AJAX view? At first glance it sounds like you might be overwriting the cached HTML view with the AJAX view, which does not include any media like CSS/JS.

Can you include example URLs (obfuscated if necessary) you are using for normal and AJAX requests?

share|improve this answer
The cache is set up in the Django settings and isn't specific on what it caches so I'm assuming everything, the schema is right out of the Django docs. The AJAX that is happening is actually coded into an app I am using for flagging (Django-flag fork). It's all pretty stock, I haven't coded anything special into it. The view came with the app, the only thing I wrote is the template. It checks if the object can be flagged, and if it can't, which means it's already flagged, it shows a span of 'flagged' across it. – Jmichelsen Mar 5 '12 at 20:16
The fork can be found here. you can look at the code in entirety. – Jmichelsen Mar 5 '12 at 20:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.