| |
| |
|
|
|
|
| |
|
| |
|
| :: |
| Author |
Message |
wwwmaster
Joined: 10 Mar 2007 Posts: 9
|
Posted: Wed Mar 14, 2007 10:47 am Post subject: Sitemaps & RSS Feeds 304 Not Modified reply? |
|
|
Hello,
I see that this MOD supports sending of 304 Not Modified header when the content has not changed.
I tried to look how this MOD determines if the content is new or not. I didn't find the info easily, so I'll ask here
If the cache is not fresh, does the MOD generate all the content before checking the client's "If-Modified-Since" -header?
If this is the case, then it generates extra load, if the cache is not fresh.. |
|
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15242
|
Posted: Wed Mar 14, 2007 1:13 pm Post subject: Re: Sitemaps & RSS Feeds 304 Not Modified reply? |
|
|
Well yes, that's the whole point about cache and the auto regeneration option in acp, if set to yes (which is the common setting), every time the cache will be outdated when a request is sent, it will be regenerated and the updated content will be sent.
Mod since option is an extra check performed differently if you use or not the physical cache on the server.
If you have cache activated for sitemaps, with auto regen, the mod since value will be based on the physical cached file creation date. If the cached file is not outdated, and the browser cares about HTTP_IF_MODIFIED_SINCE and / or HTTP_IF_NONE_MATCH vars, the module will output a 304 and won't event send the cached file.
If you did not activated the cache, but still activated mod since in acp, the lastmod date will be based on the rss_cache_born (or yahoo_cache_born or ggs_cache_born depending on the request) setting in the ggs_config table instead. The module will again be able, again if the browser supports it and already have an up to date version in it's cache, to cut the process sending a 304 before we build the page in this case, rather than sending the cache.
Mod since is just an extra caching layer to the main one, it's not as reliable as browser will still look for update if you refresh the page couple time, but still, all we can win here is good to take
For the coding itself, have a look at ggs_functions.php, the functions dealing with mod since are :
ggs_setup_cache()
ggs_updt_lastmod()
and
check_mod_since()
They are all dealt with before we eventually send a cached file or include the proper file to build the page.
++ |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
|
| Navigation |
Similar Topics |
|
|
|
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |