Wednesday 27 April 2011

XSS Protection Service

The XSS Protection service in CQ v5.3 is great. However, having problems with it clashing with the xerces XML parser. From looking at the error on forum posts, it probably should not contain the xml apis package inside it's bundle.

Think I'll need to raise a Day Care ticket for this one.

Wednesday 20 April 2011

Browser Bookmarks

I have created a very useful way to store my CQ environment bookmarks so that any system is easily accessible.

Create a folder in the Bookmarks Toolbar for each Environment. E.g.

Dev/ Sit/ UAT/ Perf/ Live/ Educ/

Then, in each environment, create a set of sub folders for CRX, Felix, etc...

Live/
CRX/ Felix/ Publish HTML/ Logs/ System Status/

Then put bookmarks to all of your CRX instances, for that environment, under the CRX folder, etc...

The beauty of this is that in browsers (Firefox 3.5 at least) you can quickly navigate to the "Live/CRX" folder and select "open all in tabs". Gaining fast access to Content Explorer when you have to go and look in multiple instances.

Tuesday 19 April 2011

HTML page construction standards for performance

Started off with a page in my local dev environment. Jmeter script to fire 10 threads & make a total of 50 requests. All times in milliseconds.

First run:-
Ave: 765 90%:859 Max: 880

Combined 10 javascript files in to 1.
Second run:-
Ave: 653 90%:729 Max: 877

Minified the combined javascript file.
Third run:-
Ave: 610 90%:685 Max: 697

Moved the Omniture stuff to the bottom of the page (just before the usual "scripts.jsp" is included).
Fourth run:-
Ave: 554 90%:564 Max: 576

2 Development Standards to be adopted
Combine most of your javascripts in to 1 file.
Minify that javascript file.
Leave Omniture until last! (Preferably with an Ajax request onload).

Wednesday 13 April 2011

Improving performance with browser caching

On requests, check that you are using browser caching.

Last-Modified should be set.
Expires should be set (seems to be dynamically set if max-age is set on cache-control).
On cache-control - watch out for must-revalidate - this seems to bypass the cache.

This is not good:-
Cache-Control max-age=0

This is OK:-
Cache-Control max-age=1800, public, must-revalidate

NB, public is to allow caching on SSL links.

This is BEST:-
Cache-Control max-age=18000, public

Are the flash files cached?

Tuesday 12 April 2011

Online backups

The online backup seems to occur in 3 or 4 stages (not clear from the logs).

In the last stage, dor a large repository (40GB) threads seem to hang if anyone tries to login. However, the online backup will eventually finish and the hung threads are released to do work. No need to restart the server.

The start of the online backup looks like this (in system out log) :-
SystemOut O dd.mm.yyyy hh:mm:ss *INFO * Backup: Read size (nnnnnnnnn bytes) after nnnnnn ms (Backup.java, line 169)

The end of the online backup looks like this :-
SystemOut O dd.mm.yyyy hh:mm:ss *INFO * Backup: Copied last stage after nnnnnnnnnn ms (Backup.java, line 198)

(working on externalising the Data Store to reduce the online backup time by 70%).

_rep_policy.xml

If you have modified a _rep_policy.xml file and put it into a package, then when you install it, make sure to check the advanced settings / Access Control Handling.

If you know you have all the settings in the rep:Policy, then choose Overwrite.

Monday 11 April 2011

Excluding folders from causing a dispatcher flush

So, you have reverse replication all set up and the usergenerated content is being replicated to all the other publish instances in your CQ estate.

However, upon closer examination of the logs, especially at peak time, you notice that the dispatcher cache is being invalidated too much. And the culprit is /content/usergenerated - the reverse replicated content!

To exclude this, create a user in the system and replicate it to the publish nodes, then modify the rep:policy XML for the /content/usergenerated node to deny this user jcr:all.

Finally, associate this user with the flush agent on the publish instances (the first tab of the user details dialog).

Thursday 7 April 2011

Another useful Adobe hotfix

Adobe CQ hotfix for Replication Stabilization = 34595.

Another must have hotfix!

Adobe Hotfixes

The following hotfixes are a must have for making ratings scalable (if you use CQ ratings).

cq-5.3.0-hotfix-28211.zip
cq-5.3.0-featurepack-28358-1.2.zip
cq-5.3.0-featurepack-30397-2.0.zip
cq-5.3.0-hotfix-30518-1.0.zip
cq-5.3.0-featurepack-31033-2.1.zip
cq-5.3.0-hotfix-34541-1.1.zip

Wednesday 6 April 2011

Setting up dispatcher

Here are some pointers to setting up a Day CQ dispatcher

On windows,
In dispatcher.any, set the docroot to something simple like
/docroot "c:/mywork/htdocs/cache"
Change the permissions on this folder so that apache can write to it.

In httpd.conf
DocumentRoot "C:/mywork/htdocs"

If there are rewrite rules required, then remember to turn the RewriteEngine on :-

RewriteEngine on
RewriteRule ^/?$ /content/projectx/en/home.html [QSA,PT,L]
RewriteRule ^(?!/content/)(.*).html$ /content/projectx/en$0 [QSA,PT,L]
RewriteRule ^(/css/).*$ /apps/projectx/docroot$0 [QSA,PT,L]
RewriteRule ^(/js/).*$ /apps/projectx/docroot$0 [QSA,PT,L]
RewriteRule ^(/images/).*$ /apps/projectx/docroot$0 [QSA,PT,L]

If you see the following error in the dispatcher.log :-
[Thu Apr 07 06:54:02 2011] [D] [1780(1444)] Filter rejects GET /css/projectx.css HTTP/1.1

Then the "/filter /glob" section is blocking the retrieval of the page from the publish server.