Dynamic Content Return HTTP 304

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
pkSML
-


Joined: 29 May 2006
Posts: 952
Location: Michigan, USA

PostPosted: Wed Dec 10, 2008 2:43 am    Post subject: Dynamic Content Return HTTP 304 Reply with quote

Hey guys. I thought I might share this with you.

Sometimes you have a script that generates dynamic content. For instance, you have your site's CSS code that's actually a php file. You don't want users to have to re-download the latest version of the file, but Abyss always serves up a 200 OK header rather than a 304 Not Modified.

Here's a little code snippet to go at the very beginning of your script that will check the last modified time of the file in question and return the appropriate header.

URL: http://code-bin.homedns.org/202

By the way, I updated the abyss-websites.com website. If there are any Abyss sites not in the database, feel free to add them! I also updated the layout of my own site - http://pksml.net (My sites's CSS code uses the code snippet.)
_________________
Stephen
Need a LitlURL?


http://CodeBin.yi.org
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group