on 07-08-2008 10:52 AM
Hi all,
I have a very annoying problem:
I modified a portal component (toolarea) to fit into our portal layout and added a css file to it. In the process of development I made several changes to the css file and re-deployed the PAR file.
Now, when opening the portal I always get an old version of the CSS file which causes the layout to fall apart.
The weird thing is:
- Pressing [Ctrl + F5] (explicit reload without cache) loads the correct file.
- Pressing only [F5] (simple reload) then again loads the old file.
To answer the obvious questions in advance:
- The iView is set to not be cached.
- Portal navigation cache is switched off completely.
- Browser cache is disabled and was cleared before reload.
- Proxy is disabled.
I already removed the component from PCD and redeployed it, deleted the corresponding iView and recreated it, but nothing shows any effect to the problem.
Where is that old version of the css file comming from?
And even more important: How do I prevent that from happening?
Thanks in advance and kind regards,
Roland
As I found no real solution to the problem, this is what I did as workaround:
- rename the .css file to .jsp
- include java code in the file to set no-cache headers
That way the file should never get cached anywhere.
Not very nice but works and much simpler than renaming the file and the reference to it in the code after every change.
Maybe the code is useful for someone else (although it's nothing special), so I post it here:
<%@ page import = "java.util.Date" %>
<%@ page import = "javax.servlet.http.*" %>
<%
Date now = new Date();
response.addHeader("Pragma","no-cache");
response.addHeader("Cache-Control","no-cache");
response.addDateHeader("Date",now.getTime());
response.addDateHeader("Expires",now.getTime());
%>
Kind regards an thanks anyway,
Roland
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try re-starting the cluster.
Check is there any css mapping in visual administration.
Thanks and Regards,
gopal.sattiraju
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
restarting the cluster is no real option here. And as I suspect this to be a general problem (we already had that in the past on another portal, even after a restart), it might happen again after the next changes to the files. I cannot restart the cluster everytime I update a CSS file.
Can you tell me where I have to look for a css mapping in visual administrator? I don't know where I find that setting.
Many thanks,
Roland
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.