(note: I am sure the Liferay admins would find this one as no surprise)
For those JSF / Primefaces portlet developers (fellow J2EE programmers) out there...
Liferay 6.x Portlet Development / Disabling web browser cache: SOLUTION / WORKAROUND
To disable the web browser caching of your primefaces / JSF portlets in Liferay...
... the answers turns out to be one of configuration. However, this turns-off web browser caching for ALL portlets in a given Liferay 6.X portal.
1. Open up a file editor
2. Paste in the following content:
__________________________________________________________________________________
1
2##
3## Browser Cache
4##
5
6 #
7 # Set this to true if you want the portal to force the browser cache to be
8 # disabled. It will only disable the cache for the rendered HTML response
9 # It will not have an impact on static content or other resources.
10 #
11 browser.cache.disabled=true
12
13 #
14 # Set this true if you want to disable the cache for authenticated users.
15 # This property is not read when the property
16 # "browser.cache.signed.in.disabled" is true. This is useful to ensure that
17 # authenticated users cannot go to the sign in page by clicking on the back
18 # button in their browsers.
19 #
20 browser.cache.signed.in.disabled=true
__________________________________________________________________________________
3. Save as: [portal-ext.properties]
4. With your Liferay 6.X Portal shutdown, copy the file:[portal-ext.properties] into the directory:[/alpha/beta/gamma/.../omega/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/classes]
5. Restart Liferay Server paying attention to the logs for any startup / configuration errors
6. To test / confirm, using Firefox with Firebug plugin, access any portlet page, and check your Firebug plugin:
6.1 tab: / sub-tab:
6.2 expand out the GET URL
6.3 click on sub-sub-tab:
6.4 subsection:[Response Headers] should look something like this:
-------------------------------------------------------------------
1
2 Server Apache-Coyote/1.1
3 Set-Cookie JSESSIONID=5DA1E6DCAB27D2BF4206D65FEC45CEC6; Path=/; HttpOnly GUEST_LANGUAGE_ID=en_US; Expires=Sun, 22-Sep-2013 00:50:10 GMT; Path=/
4 Content-Encoding gzip
5 Expires Thu, 01 Jan 1970 00:00:00 GMT
6 Cache-Control private, no-cache, no-store, must-revalidate
7 Pragma no-cache
8 Liferay-Portal Liferay Portal Community Edition 6.1.1 CE GA2 (Paton / Build 6101 / July 31, 2012)
9 Content-Type text/html;charset=UTF-8
10 Transfer-Encoding chunked
11 Date Sat, 22 Sep 2012 00:50:10 GMT
-------------------------------------------------------------------
6.5 pay attention to "Expires", "Cache-Control", and "Pragma"
-------------------------------------------------------------------------------------------------------
Primefaces (v3.3.1), Mojarra JSF API Implementation 2.1.3 (b02-FCS), Liferay 6.1 CE (Tomcat 7.0.27), Linux operation system