Share this topic on AskShare this topic on Del.icio.usShare this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on LiveShare this topic on MagnoliaShare this topic on MySpaceShare this topic on RedditShare this topic on SlashdotShare this topic on StumbleUponShare this topic on TechnoratiShare this topic on TwitterShare this topic on YahooShare this topic on Google buzz

Author Topic: A Minor BV Website Hiccup  (Read 881 times)

0 Members and 1 Guest are viewing this topic.

Offline DJanda

  • Premium Member
  • *****
  • Posts: 216
  • It's gotta be in here somewhere...
A Minor BV Website Hiccup
« on: June 29, 2009, 11:25:35 PM »
I have noticed that regardless of whether I have logged off or not, the greeting on the first screen is "Hello Guest". The greeting used to be "Hello DJanda" if I was still logged on -- No problem, just curious ???

Offline Black Viper

  • Administrator
  • ******
  • Posts: 2258
  • "Have you tweaked your OS lately?"
    • Black Viper's Web Site
Re: A Minor BV Website Hiccup
« Reply #1 on: June 30, 2009, 02:13:30 AM »
Which page? The main web site or the forums?
It does work for me on both.
On the main web site, if you go to a page that you have not been to and were not logged in, then log in and return to that page, it will still say that you are a Guest due to the page not changing in content. This is to reduce my bandwidth considerably. I do not like it, but it is something that I have to do.
However, on the forums, the greeting should change each time you log in and out, regardless if you have visited the page before or not.

Offline Black Viper

  • Administrator
  • ******
  • Posts: 2258
  • "Have you tweaked your OS lately?"
    • Black Viper's Web Site
Re: A Minor BV Website Hiccup
« Reply #2 on: June 30, 2009, 08:28:59 AM »
After making the above post and thinking about it, I can probably make it so that premium members would get a refresh of the pages contents so they are not pestered with ads (which is my original intentions for implementing the login feature on the main web site, anyway) but still holding out and giving cached content to others.
Not sure when I can get to this. I will try to look at the code today and hopefully come up with a viable solution that does not involve increasing my outbound bandwidth by 2+ times.

Offline Black Viper

  • Administrator
  • ******
  • Posts: 2258
  • "Have you tweaked your OS lately?"
    • Black Viper's Web Site
Re: A Minor BV Website Hiccup
« Reply #3 on: June 30, 2009, 08:39:32 AM »
For those wondering about the formalities of this issue, here it is in a nutshell.
I am not sure if I can check login status early enough in the html page wrapper and still check etag status (which verifies the page already downloaded against the server side code).
Even if you force a refresh, my server still checks the last modified file hash (etag) of the underlying page content (main web site, forums are not included in this issue) and deals with it accordingly, offering up a "not modified" server response while not actually resending the current page contents again.
I may be able to run a check against login status and refresh the page, regardless, but will have to experiment and see if this is feasible or not.

BV EDIT: I check the etag and last modified header very early on in the page wrapper code to reduce the overhead associated with processing requests that need not be processed for obvious reasons. More to come.
« Last Edit: June 30, 2009, 08:41:48 AM by Black Viper »

Offline DJanda

  • Premium Member
  • *****
  • Posts: 216
  • It's gotta be in here somewhere...
Re: A Minor BV Website Hiccup
« Reply #4 on: June 30, 2009, 09:11:28 AM »
Which page? The main web site or the forums?
The main page (i.e. the Black one  :) )

Offline Black Viper

  • Administrator
  • ******
  • Posts: 2258
  • "Have you tweaked your OS lately?"
    • Black Viper's Web Site
Re: A Minor BV Website Hiccup
« Reply #5 on: June 30, 2009, 09:14:54 AM »
I modified the page wrapper code to not check the etag status if the person is logged in as a premium member (didn't take as long as I thought since I have been thinking about this and the method I needed to do after the original reply). This worked as intended with my test account, however, forcing a refresh of the page did not as the server itself still checks the etag and last modified status the browser sends completely independent of the html page wrapper code executed at the server level behind the scenes.

As such, I am unaware of a method to "force" a server refresh for logged in members as the server is not integrated with the forums directly at that level. I must keep etag and last modified header checks in there at the server level to ensure outbound bandwidth stays in check for content other then the html page itself, such as the images and JavaScript associated with a particular page.

At this time, if you visit a page on the main web site while not logged in, you will get the "guest" content. If you then login after the fact and return to that page, you will still see the "guest" content cached in your browser. Forcing a refresh will not change the pages content. Visting a new page (not cached), you will see the login greeting as well as no ads for premium members.

I will kick around a few more ideas in the coming days and see if I can come up with a viable solution, but do not count on it. :)

I appreciate the feedback on the matter, though, as this has bugged me since day one. Unfortunately, "working as intended" for now. :)

BV EDIT: As a side note, if you do stay logged in and the pages on the main web site "change" from the last visit, you will then see a refresh of the content and have the greeting. Since I cannot leave things alone for long, I do "site wide" updates to the navigation code, etc, often, so the cached "guest" page should not be there for longer then a few days, anyway. :)

As an example, since I modified the code, then removed the modification, the underlying pages "have changed" and you should be greeted accordingly upon page refresh/revisiting if logged in.
« Last Edit: June 30, 2009, 09:20:00 AM by Black Viper »

Offline DJanda

  • Premium Member
  • *****
  • Posts: 216
  • It's gotta be in here somewhere...
Re: A Minor BV Website Hiccup
« Reply #6 on: June 30, 2009, 09:17:38 AM »
Works now! TK  8)

Offline Black Viper

  • Administrator
  • ******
  • Posts: 2258
  • "Have you tweaked your OS lately?"
    • Black Viper's Web Site
Re: A Minor BV Website Hiccup
« Reply #7 on: June 30, 2009, 09:20:55 AM »
Works now! TK  8)
No problem, see my edit directly above, though. :P

Offline Black Viper

  • Administrator
  • ******
  • Posts: 2258
  • "Have you tweaked your OS lately?"
    • Black Viper's Web Site
Re: A Minor BV Website Hiccup
« Reply #8 on: February 22, 2010, 06:26:05 AM »
This should no longer be an issue.

Offline DJanda

  • Premium Member
  • *****
  • Posts: 216
  • It's gotta be in here somewhere...
Re: A Minor BV Website Hiccup
« Reply #9 on: February 23, 2010, 10:33:27 PM »
This should no longer be an issue.
Cool Now, on to the next.

I have noticed that when you move a thread (and I read the post) that it doesn't register as being "read". That is, I use "Show unread posts since last visit" to move from a "read" post on to the next "unread" post. But, after I have read "moved" post, it still remains on the list of unread posts. ???

Offline Black Viper

  • Administrator
  • ******
  • Posts: 2258
  • "Have you tweaked your OS lately?"
    • Black Viper's Web Site
Re: A Minor BV Website Hiccup
« Reply #10 on: February 24, 2010, 02:20:47 AM »
I have noticed that when you move a thread (and I read the post) that it doesn't register as being "read". That is, I use "Show unread posts since last visit" to move from a "read" post on to the next "unread" post. But, after I have read "moved" post, it still remains on the list of unread posts. ???
That is because it automatically redirects to the moved topic (and never actually touches the move posting). That redirection post will be gone in 24 hours. If you would prefer, I can set future moved topics not to redirect and this would not be an issue. You would have to view the "this topic has moved" post and click through the posted link.

Offline DJanda

  • Premium Member
  • *****
  • Posts: 216
  • It's gotta be in here somewhere...
Re: A Minor BV Website Hiccup
« Reply #11 on: February 24, 2010, 09:30:46 AM »
No problem actually, I was just noting some strange (to me) behavior and was wondering about the cause. Thanks for the explanation.  8)