Teh ForumCaching Problem

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  Peter (BOUGHTONP)  
 To:  Matt     
37795.1 
Since the server move (roughly) I've been getting an annoying caching problem - initially looked like threads weren't being marked as read, when in reality it was the thread_list just showing old (cached) content. Updates if I refresh, but not if I load a page normally.

Only occurs when connected on my T-Mobile 3G connection, but happens on both mobile(Android browser) and desktop (Chrome/Firefox).

Looking at the Response Headers, I get an Expires header set five minutes into the future:
quote:
Server nginx
Date Fri, 22 Oct 2010 18:45:57 GMT
Content-Type text/html
Set-Cookie thread_mode_DEFAULT=0
Vary Accept-Encoding
Content-Encoding gzip
Transfer-Encoding chunked
Expires Fri, 22 Oct 2010 18:50:57 GMT



Since I don't get this on other connections, I'm assuming this is something the T-Mobile bastards are doing.

However, since it seems to have coincided with the server move, I'm wondering if there's some setting that might have changed which allowed this to start happening (or if it's just a coincidence).

Any thoughts?
0/0
 Reply   Quote More 

 From:  Manthorp  
 To:  Peter (BOUGHTONP)     
37795.2 In reply to 37795.1 
Is there a cache for questions?

Badaboom (ding)

"We all have flaws, and mine is being wicked."
James Thurber, The Thirteen Clocks 1951

0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  Manthorp     
37795.3 In reply to 37795.2 

Yes, the same Expires +5min header is received for messages.

 

Since it's usually following a different URL to get to messages it's less noticable, (though I did just get it after posting this reply) - whereas the thread list is the same URL each time the Go button is pressed.

0/0
 Reply   Quote More 

 From:  Manthorp  
 To:  Peter (BOUGHTONP)     
37795.4 In reply to 37795.3 
I am suitably deflated.

"We all have flaws, and mine is being wicked."
James Thurber, The Thirteen Clocks 1951

0/0
 Reply   Quote More 

 From:  Matt  
 To:  Peter (BOUGHTONP)     
37795.5 In reply to 37795.1 
Does it do the same from work or is it just your T-Mobile connection?

The thread list and message pane both send Last-Modified headers, but these are disabled if Beehive detects what it believes is a proxy server, which is does using a list of known HTTP request headers that proxy servers send. When a proxy server is detected it sends a past date as the expires header, specifically Beehive's DOB (or release date of 0.1 if you prefer), and the current date and time including seconds as the last-modified header (amongst others).

I've checked the server as well, and it's correctly reporting 21:47 UTC (as of writing) as it's time.

Presumably the T-Mobile proxy server isn't detectable by Beehive, or it doesn't it reveal itself. It would be interesting to find out if the T-Mobile proxy server does send anything that can be identified, in order to prevent caching. Remind me tomorrow and I'll set up a script to reply with request headers and we'll see if anything looks likely.

doohicky

0/0
 Reply   Quote More 

 From:  Matt  
 To:  Peter (BOUGHTONP)     
37795.6 In reply to 37795.1 
http://www.tehforum.co.uk/headers.php

doohicky

0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  Matt     
37795.7 In reply to 37795.5 
Just T-Mobile - both work and wifi at parents are fine.
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  Matt     
37795.8 In reply to 37795.6 
code:
Array
(
    [USER] => www-data
    [HOME] => /var/www
    [FCGI_ROLE] => RESPONDER
    [QUERY_STRING] => 
    [REQUEST_METHOD] => GET
    [CONTENT_TYPE] => 
    [CONTENT_LENGTH] => 
    [SCRIPT_NAME] => /headers.php
    [REQUEST_URI] => /headers.php
    [DOCUMENT_URI] => /headers.php
    [DOCUMENT_ROOT] => /usr/local/nginx/html
    [SERVER_PROTOCOL] => HTTP/1.1
    [GATEWAY_INTERFACE] => CGI/1.1
    [SERVER_SOFTWARE] => nginx/0.7.65
    [REMOTE_ADDR] => 178.110.238.153
    [REMOTE_PORT] => 44225
    [SERVER_ADDR] => 178.79.137.101
    [SERVER_PORT] => 80
    [SERVER_NAME] => www.tehforum.co.uk
    [REDIRECT_STATUS] => 200
    [SCRIPT_FILENAME] => /home/tehforum/httpdocs/headers.php
    [HTTP_REFERER] => http://www.tehforum.co.uk/forum/messages.php?webtag=DEFAULT&msg=37795.5
    [HTTP_ACCEPT] => application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    [HTTP_USER_AGENT] => Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3
    [HTTP_ACCEPT_ENCODING] => gzip,deflate,sdch
    [HTTP_ACCEPT_LANGUAGE] => en-GB,en-US;q=0.8,en;q=0.6
    [HTTP_ACCEPT_CHARSET] => ISO-8859-1,utf-8;q=0.7,*;q=0.3
    [HTTP_COOKIE] => __utmz=47895714.1272732323.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); bh_auto_logon=Y; bh_remember_username=boughtonp; bh_remember_password=++++++; bh_remember_passhash=snip; bh_DEFAULT_style=default; bh_forum_style=default; user_logon=boughtonp; user_passhash=snip; sess_hash=snip; thread_mode_DEFAULT=1; __utma=47895714.682241493.1285301682.1287702298.1287772993.96; __utmc=47895714; __utmb=47895714.65.10.1287772993; forum_style=default
    [HTTP_HOST] => www.tehforum.co.uk
    [HTTP_CACHE_CONTROL] => max-age=43200
    [HTTP_CONNECTION] => keep-alive
    [PHP_SELF] => /headers.php
    [REQUEST_TIME] => 1287784851
)
Array
(
)


And force-refreshing:

code:
Array
(
    [USER] => www-data
    [HOME] => /var/www
    [FCGI_ROLE] => RESPONDER
    [QUERY_STRING] => 
    [REQUEST_METHOD] => GET
    [CONTENT_TYPE] => 
    [CONTENT_LENGTH] => 
    [SCRIPT_NAME] => /headers.php
    [REQUEST_URI] => /headers.php
    [DOCUMENT_URI] => /headers.php
    [DOCUMENT_ROOT] => /usr/local/nginx/html
    [SERVER_PROTOCOL] => HTTP/1.1
    [GATEWAY_INTERFACE] => CGI/1.1
    [SERVER_SOFTWARE] => nginx/0.7.65
    [REMOTE_ADDR] => 178.110.238.153
    [REMOTE_PORT] => 56880
    [SERVER_ADDR] => 178.79.137.101
    [SERVER_PORT] => 80
    [SERVER_NAME] => www.tehforum.co.uk
    [REDIRECT_STATUS] => 200
    [SCRIPT_FILENAME] => /home/tehforum/httpdocs/headers.php
    [HTTP_REFERER] => http://www.tehforum.co.uk/forum/messages.php?webtag=DEFAULT&msg=37795.5
    [HTTP_PRAGMA] => no-cache
    [HTTP_ACCEPT] => application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    [HTTP_USER_AGENT] => Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3
    [HTTP_ACCEPT_ENCODING] => gzip,deflate,sdch
    [HTTP_ACCEPT_LANGUAGE] => en-GB,en-US;q=0.8,en;q=0.6
    [HTTP_ACCEPT_CHARSET] => ISO-8859-1,utf-8;q=0.7,*;q=0.3
    [HTTP_COOKIE] => __utmz=47895714.1272732323.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); bh_auto_logon=Y; bh_remember_username=boughtonp; bh_remember_password=snip; bh_remember_passhash=snip; bh_DEFAULT_style=default; bh_forum_style=default; user_logon=boughtonp; user_passhash=snip; sess_hash=snip; thread_mode_DEFAULT=1; __utma=47895714.682241493.1285301682.1287702298.1287772993.96; __utmc=47895714; __utmb=47895714.67.10.1287772993; forum_style=default
    [HTTP_HOST] => www.tehforum.co.uk
    [HTTP_CACHE_CONTROL] => no-cache, max-age=43200
    [HTTP_CONNECTION] => keep-alive
    [PHP_SELF] => /headers.php
    [REQUEST_TIME] => 1287785010
)
Array
(
)




Hmmm... was assuming the remote_port change was a difference between regular loading and refreshing, but seems it's just sometimes changing on its own, independent of that. Dunno if that's meaningful.
0/0
 Reply   Quote More 

 From:  Matt  
 To:  Peter (BOUGHTONP)     
37795.9 In reply to 37795.8 
The remote port is the client port (i.e. your PC's port) so that will change quite often.

The only difference between your header data and my own, bar the obvious session hash etc., is the HTTP_CACHE_CONTROL header. Using Firefox 3.6.11, I'm always sending max-age=0 but you seem to be sending max-age=43200, which equates to 12 hours.

I'm not sure if max-age greater than 0 is a reliable way to detect a caching proxy server or not, but if it is, in your case it seems to imply the proxy server will cache the page for 12 hours. It would be nice to find out if that really is the case.

Would also be interesting to see what other user's (hint) get, especially those we know who are subscribed to ISPs that use proxy servers, which off the top of my head includes Virgin (well, old school ntlworld / Telewest customers - don't know if Virgin still use them) and AOL. Presumably a lot of mobile operators also use caching proxy servers too.

doohicky

0/0
 Reply   Quote More 

 From:  Mouse  
 To:  Matt     
37795.10 In reply to 37795.9 
I think I get this happening on O2 mobile broadband on android. But not on Virgin home broadband and not on Be or Plus at work.

Roses are bollocks, Violets are crud, I hate bloody flowers, And much prefer mud.
0/0
 Reply   Quote More 

 From:  Matt  
 To:  Mouse     
37795.11 In reply to 37795.10 
Can you try accessing the script above and copy and paste here what you receive back?

For the record (from O2 mobile) I get the same HTTP_CACHE_CONTROL header as Pete, but with an additional no-cache parameter before it.

doohicky

0/0
 Reply   Quote More 

 From:  Mouse  
 To:  Matt     
37795.12 In reply to 37795.11 
Erm, sorry.. I'm not sure how I do that.

Roses are bollocks, Violets are crud, I hate bloody flowers, And much prefer mud.
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  Mouse     
37795.13 In reply to 37795.12 
1. Visit Teh on your mobile.
2. Click the link above. (Or this one here.)
3. Copy output, Paste into a reply.

Which bit are you not sure about? :?
0/0
 Reply   Quote More 

 From:  Mouse  
 To:  Peter (BOUGHTONP)     
37795.14 In reply to 37795.13 
Ah I see sorry, hang on.

Roses are bollocks, Violets are crud, I hate bloody flowers, And much prefer mud.
0/0
 Reply   Quote More 

 From:  Mouse  
 To:  ALL
37795.15 
php code:
Array
(
    [USER] => www-data
    [HOME] => /var/www
    [FCGI_ROLE] => RESPONDER
    [QUERY_STRING] =>
    [REQUEST_METHOD] => GET
    [CONTENT_TYPE] =>
    [CONTENT_LENGTH] =>
    [SCRIPT_NAME] => /headers.php
    [REQUEST_URI] => /headers.php
    [DOCUMENT_URI] => /headers.php
    [DOCUMENT_ROOT] => /home/tehforum/httpdocs
    [SERVER_PROTOCOL] => HTTP/1.1
    [GATEWAY_INTERFACE] => CGI/1.1
    [SERVER_SOFTWARE] => nginx/0.7.65
    [REMOTE_ADDR] => 94.171.153.25
    [REMOTE_PORT] => 57430
    [SERVER_ADDR] => 178.79.137.101
    [SERVER_PORT] => 80
    [SERVER_NAME] => www.tehforum.co.uk
    [HTTP_ACCEPT_ENCODING] => gzip
    [HTTP_ACCEPT_LANGUAGE] => en-GB, en-US
    [HTTP_CLIENT_IP] =>
    [HTTP_COMING_FROM] =>
    [HTTP_FORWARDED] =>
    [HTTP_FORWARDED_FOR] =>
    [HTTP_HOST] => www.tehforum.co.uk
    [HTTP_IF_NONE_MATCH] =>
    [HTTP_IF_MODIFIED_SINCE] =>
    [HTTP_REFERER] =>
    [HTTP_SCHEME] => http
    [HTTP_USER_AGENT] => Mozilla/5.0 (Linux; U; Android 2.2.1; en-gb; Nexus One Build/FRG83) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
    [HTTP_VIA] =>
    [HTTP_X_COMING_FROM] =>
    [HTTP_X_FORWARDED] =>
    [HTTP_X_FORWARDED_FOR] =>
    [REDIRECT_STATUS] => 200
    [SCRIPT_FILENAME] => /home/tehforum/httpdocs/headers.php
    [HTTP_ACCEPT] => application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/ png,*/*;q=0.5
    [HTTP_ACCEPT_CHARSET] => utf-8, iso-8859-1, utf-16, *;q=0.7
    [PHP_SELF] => /headers.php
    [REQUEST_TIME] => 1287957681
)
Array
(
)

Roses are bollocks, Violets are crud, I hate bloody flowers, And much prefer mud.
0/0
 Reply   Quote More 

Reply to All    
 

1–15

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats