Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,928
    Thanks
    6
    Thanked 1,041 Times in 1,014 Posts

    Serve dynamic page as static?

    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?
    Last edited by VIPStephan; 08-28-2008 at 01:48 PM.

  • #2
    Regular Coder
    Join Date
    Nov 2007
    Location
    127.0.0.1
    Posts
    348
    Thanks
    26
    Thanked 40 Times in 39 Posts
    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.
    Blog Charity:Water
    WhatisWrongWith.me/tagnu - Send me anonymous feedback.

  • #3
    Regular Coder croatiankid's Avatar
    Join Date
    Jan 2006
    Posts
    665
    Thanks
    1
    Thanked 12 Times in 12 Posts
    Yeah, I'm pretty sure that's a browser feature.

  • #4
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,928
    Thanks
    6
    Thanked 1,041 Times in 1,014 Posts
    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.

  • #5
    Regular Coder croatiankid's Avatar
    Join Date
    Jan 2006
    Posts
    665
    Thanks
    1
    Thanked 12 Times in 12 Posts
    Well here are the HTTP headers for a google search page:
    Code:
    Cache-Control: private, max-age=0
    Date: Thu, 28 Aug 2008 13:01:06 GMT
    Expires: -1
    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_fnCMW1JHwentRFNlwD9HKgVycfhoF4yEmJEkWGTGbMfrYwYFEqlzjZmOJnYsARF-Qsb; expires=Sat, 28-Aug-2010 13:01:06 GMT; path=/; domain=.google.com
    Server: gws
    Transfer-Encoding: chunked
    So I guess you could look through apache documentation to see how (now that you can get some keywords from these headers).

  • #6
    Regular Coder
    Join Date
    Nov 2007
    Location
    127.0.0.1
    Posts
    348
    Thanks
    26
    Thanked 40 Times in 39 Posts
    Quote Originally Posted by VIPStephan View Post
    ..... 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?)
    Blog Charity:Water
    WhatisWrongWith.me/tagnu - Send me anonymous feedback.

  • #7
    Regular Coder
    Join Date
    Nov 2007
    Location
    127.0.0.1
    Posts
    348
    Thanks
    26
    Thanked 40 Times in 39 Posts
    VIP, see if this helps?
    Introduction to web caching
    Blog Charity:Water
    WhatisWrongWith.me/tagnu - Send me anonymous feedback.

  • #8
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,928
    Thanks
    6
    Thanked 1,041 Times in 1,014 Posts
    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.

  • #9
    Regular Coder
    Join Date
    Nov 2007
    Location
    127.0.0.1
    Posts
    348
    Thanks
    26
    Thanked 40 Times in 39 Posts
    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 ?
    Blog Charity:Water
    WhatisWrongWith.me/tagnu - Send me anonymous feedback.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •