Page 1 of 1

Content of comment-box deleted when navigating in Firefox/IE

Posted: Sun Apr 08, 2007 9:48 pm
by tmix
I have two problems with my s9y blog which I find annoying (and I think might be related). They happen as well on the official s9y blog.

If I go to a blog entry, enter some text into the comment box and then navigate back and forward again, the text is lost. The same happens if I enter text, press a link to go to another page and the press back to return to the blog entry with the comment: the comment field is empty.

This happens in Firefox 1.5.0.11 and IE 7. This does not happen in Opera 9.02.

Another thing that happens when I navigate back and forward is that the page is always displayed "scrolled to the top". For example, if I scroll down in a long blog entry, press a link to go to a different page and then press back in my browser, the page does not scroll down to its previous position.

This happens in Firefox 1.5.0.11. It does not happen in IE 7 or Opera 9.02.

Does anybody know what causes this or how I could fix that?

Re: Content of comment-box deleted when navigating in Firefo

Posted: Tue Apr 10, 2007 10:42 am
by garvinhicking
Hi!

Yes. Both are a browser-problem, the application itself has nothing to do with it. You'll need to contact the Firefox and IE developers to kindly ask them to preseve textbox contents. Serendipity can do nothing about it!

Good luck,
Garvin

Posted: Tue Apr 10, 2007 11:08 am
by tmix
Serendipity can do nothing about it!
Well, it works with Wordpress blogs and other input forms on non-blogs (it works in this forum!) ... So either there is a workaround or it is some kind of Serendipity problem.

Posted: Tue Apr 10, 2007 11:11 am
by garvinhicking
Hi!

Hm, that's strange. Serendipity issues Cache-Headers which some browser might interpret differently. Sadly I have no experience with those, is there anyone reading here who has?

Best regards,
Garvin

Posted: Tue Apr 10, 2007 11:23 am
by garvinhicking
Hi!

Okay, I just checked the sources and see that it's caused by the HTTP "Cache-Control" headers.

Serendipity in recent versions already has an option to set those to "public" if a flag is enabled ($serendipity['CacheControl']). I've just made this setting the default for future s9y versions.

You could make use of firefox extensions or proxy tools to modify HTTP headers to set caching for you, meanwhile. Since this setting comes from the s9y blogs, it can sadly only be fixed on each individual installation...

Best regards,
Garvin

Posted: Tue Apr 10, 2007 4:52 pm
by tmix
it can sadly only be fixed on each individual installation
That is fine, as I was looking for a fix for my blog anyway :D

Now I only need to find where I have to change this...

Posted: Wed Apr 11, 2007 10:16 am
by garvinhicking
Hi!

You can change that setting in either serendipity_config.inc.php (the default value) or pre-set this $serendipity['CacheControl'] = true in serendipity_config_local.inc.php.

HTH,
Garvin