View Full Version : Serve dynamic page as static?
08-28-2008, 01:45 PM
I was just wondering because I canít remember: Whatís the process of serving a dynamic page as static page called? Like the way Google displays its search results, i. e. if you scroll down and reload the page it will still be at the bottom, not jump to the top. Does that have anything to do with cache control? Where can I find a good tutorial on how thatís done?
08-28-2008, 02:14 PM
mirage vip :)
If I'm not wrong, this happens on all pages.
For eg. you could scroll down to the quick reply section of this post and press refresh, you come back to the same section after the complete reload.
08-28-2008, 02:38 PM
Yeah, I'm pretty sure that's a browser feature.
08-28-2008, 02:56 PM
No, I do know that this is not just a browser feature. I’ve talked with someone about that and he told me it has something to do with when the page is „expired“, and that’s the server that tells the browser when that’s the case. But it was a while ago and I don’t remember anymore what exactly that was called and what to search for, therefore. And there are sites that don’t stay at (or jump back to) the location on the page where you were after refreshing. An example (although I like and endorse that CMS) is http://cmsmadesimple.org/. Scroll down and reload the page. It will jump o the top, not where you were.
08-28-2008, 03:02 PM
Well here are the HTTP headers for a google search page:
Cache-Control: private, max-age=0
Date: Thu, 28 Aug 2008 13:01:06 GMT
Content-Type: text/html; charset=UTF-8
Set-Cookie: SS=Q0=dGVzdCBzZWFyY2g; path=/search,PREF=ID=19933af4e810b19c:TM=1219928466:LM=1219928466:S=EtqEFUdHzJnF_mXW; expires=Sat, 28-Aug-2010 13:01:06 GMT; path=/; domain=.google.com,NID=14=DFXJ8vlqkYAWvt9cP0r_zfMy_dfgmHbQyHIgIcAJy6KT9CAaYb9yeGPbkL0O_fnCMW1JHwentR FNlwD9HKgVycfhoF4yEmJEkWGTGbMfrYwYFEqlzjZmOJnYsARF-Qsb; expires=Sat, 28-Aug-2010 13:01:06 GMT; path=/; domain=.google.com
So I guess you could look through apache documentation to see how (now that you can get some keywords from these headers).
08-28-2008, 03:10 PM
..... And there are sites that donít stay at (or jump back to) the location on the page where you were after refreshing. An example (although I like and endorse that CMS) is http://cmsmadesimple.org/. Scroll down and reload the page. It will jump o the top, not where you were.
I'm curious... It works if you save a local copy. (Static page?)
08-28-2008, 03:15 PM
VIP, see if this helps?
Introduction to web caching (http://www.leigeber.com/2008/04/introduction-to-web-caching/)
09-02-2008, 08:47 PM
OK, I found out that it actually is done by having a writable directory and a script creating static pages on the fly and putting them there for easy retreival. That way people get a seemingly static page delivered when they’re requesting a document.
Thanks for your input and effort, guys. :)
09-03-2008, 02:39 PM
You, mean to say, every time a user refreshes the page, a new static copy is created and served to the user ,to include the latest changes ?
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.