Eric Patrick
Eric Patrick

Reputation: 2247

qbo3 Custom CSS Changes not Detected

I am customizing a qbo3 site with CSS via Configuration > Style Sheets. However, when I make changes, those changes are not immediately reflected in the site's CSS. How do I force these changes to "take effect"?

Upvotes: 0

Views: 17

Answers (1)

Eric Patrick
Eric Patrick

Reputation: 2247

You likely are experiencing 3 issues.

  1. Custom UI elements, includes CSS, are managed with a CachedFile backing store which:
  • write the file to a distributed backing store (such as Amazon s3), and
  • when reading the file, caches the file on the web server to speed performance

If the CachedFile find the file on the web server, it does not bother fetching it from the distributed store, for up to 5 minutes (by default). This CacheDuration can be controlled from Configuration > Modules > Attachment > Settings: CacheDurationMinutes.

If you set the CacheDurationMinutes to 0, the CachedFile will read from the distributed store every time. This slows performance a bit, so it's recommended only for non-production environments.

  1. The site's CSS is cached server-side for performance reasons.

To instruct the server to "clear CSS from cache", navigate to:

/Theme.ashx/Css?nocache=1

The nocache=1 will instruct the server to rebuild the CSS and replace the cached value.

  1. Everyone's browser is instructed to cache the main menu. Even after performing steps 1 and 2, users may not see the css changes until their browser drops the main menu from cache. They can force this by adding &nocache=1 or ?nocache= to anyone.

Upvotes: 0

Related Questions