LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > PHP > Headers always no-store, no-cache etc for PHP files?

Reply
 
Thread Tools Display Modes
  #1  
Old 01-14-2007, 04:05 AM
pcguru pcguru is offline
Member
 
Join Date: Nov 2005
Posts: 17
Default Headers always no-store, no-cache etc for PHP files?

Hi!

I've got some PHP-scripts outputting Javascript code, and they are downloaded and used as javascript files in the eyes of the browser.

By using content-type in a header directive of the php-file litespeed correctly gzips the file the way I want.
<? header ('Content-Type: application/x-javascript'); ?>

The problem is that litespeed always appends these headers for files ending with '.php'
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache

That makes the browsers reload the file every time and it is rather large.
How do I go about making litespeed + PHP output the cache parameters of content-type application/x-javascript instead of for php?
Reply With Quote
  #2  
Old 01-14-2007, 07:04 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
I believe those headers was added by PHP, not by LSWS.
Reply With Quote
  #3  
Old 01-17-2007, 09:52 AM
pcguru pcguru is offline
Member
 
Join Date: Nov 2005
Posts: 17
You are right as usual. The headers are created by PHP since I use sessions.
The PHP default setting causing problems is:
Code:
session.cache_limiter = nocache
Changing this to "private" solved the issue
Reply With Quote
  #4  
Old 01-17-2007, 11:30 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Thanks for sharing.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:33 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.