Skip to:
Content
Pages
Categories
Search
Top
Bottom

Login form appearing after logging in


  • toregustafson
    Member

    @toregustafson

    I’m having the weirdest problem with Firefox and logging in on a fresh bbpress installation. In Firefox, after logging in, any previously viewed page still shows the login form rather than showing that you are logged in until I hard refresh the page. I’ve tested this on multiple computers with various OS, and it’s the same on all, IE logs in fine, Firefox needs a refresh. Somehow I think this is a server configuration issue, as I haven’t seen this on any other BBPress installation, but it’s odd the behaviour only shows in Firefox and wouldn’t know where to start looking if it really is a server issue.

    I started with an alpha 1.0 installation for integration with WP 2.7 and was having the same issue, so I tried a standalone installation 0.9.0.4 the other day and continue to have this behaviour.

Viewing 7 replies - 1 through 7 (of 7 total)
  • FF 3+ has some weird caching issues. I have that problem on multiple sites.

    http://www.west-wind.com/Weblog/posts/469125.aspx


    toregustafson
    Member

    @toregustafson

    Thanks Ipstenu, I was not aware of this issue in Firefox, presumably because I hadn’t upgraded until recently. The link you sent refers primarily to cache issues posing problems for developers trying to see updates–I’m surprised this issue doesn’t cause problems for more sites that require login for full access to content, like any forum software. If Firefox caching pages and not refreshing is causing this problem it seems this must be happening to the bbpress community at large. Is this something other BBPress folks are having issues with?


    toregustafson
    Member

    @toregustafson

    Well on further consideration I looked at the source on this forum and noticed they are placing a random number to the end of the style sheet. Notice what is currently line 5 of the source of this page:

    <link rel=”stylesheet” href=”http://bbpress.org/forum-theme/bborg/style.css?v=2047769217″ type=”text/css” />

    So, I decided the bbpress.org developers had the same difficulties with FF3.0. I tried the same thing myself and I can now log in perfect now, so I guess that is the fix. I would still love to hear from anyone else if they’ve had this issue as well though.

    Actually that’s an old trick from IE and it’s moronic ‘You have to delete everything to get IE 6 to dump css cache!’ days.

    I update that v number every time I make a change to my code, which is a pill, but … yeah, that would do it.

    I can’t believe that FF has devolved like that. BAD FF! No cookies!

    FYI, for those who are lost, you’d do something like this:

    <link rel="stylesheet" href="style.css?v=<?php echo mt_rand(); ?>" type="text/css" />


    _ck_
    Participant

    @_ck_

    You don’t want to change that number on every page load, or the CSS file will never ever cache at all and slow down page load / render.

    In theory the best number to append would be the timestamp of the CSS file itself, meaning if the CSS file was edited/saved, the number would change, hence force the cache to update. filemtime gives you the file date. The problem with using it is that on some systems it can be relatively slow and add overhead to the page load time.

    Alternately you could use today’s date, or even the current hour, ie ?".date('G');

    If you are seeing overly aggressive caching of certain files, it probably means the server has been setup that way and can be changed, at least on apache via htaccess

    _ck_ – I’ve seen it on pretty much every site since I upgraded to FF 3 :/

    But yeah, good point. You could do this <?php echo getlastmod('style.css'); ?> (filemtime is cached which would kind of defeat the purpose)


    toregustafson
    Member

    @toregustafson

    If the only issue were updating the cache when edits were made last mod date would work, but the issue I’m having is the login box still appearing on cached pages after logging in. This makes it look like the login didn’t work even though it did (refresh the page and all is good again). Maybe I could append something to style.css only if the user is logged in allowing caching to work otherwise, although the whole thing still makes me feel dirty.

    I think it’s odd that more people don’t seem to be having this problem which makes me think there is something unusual in header information provided by the server to Firefox or like _ck_ said some aggressive server side caching that somehow only Firefox is picking up on.

Viewing 7 replies - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.