...

View Full Version : how to set expiration for CSS and JS files :



2009old
08-04-2010, 05:56 PM
how to set expiration for CSS and JS files :
I dont want to do it with .htaccess files but yes if it is possible with PHP files

any help would be appreciated
thanks

2009old
08-04-2010, 08:50 PM
http://www.quinterox.com/content/blog/expire-tags-adding-them-to-your-css-javascript/

Is this a right approach to do this

????

Advanced thanks

_Aerospace_Eng_
08-04-2010, 08:56 PM
Yes that is the right approach.

2009old
08-04-2010, 09:06 PM
hey thanks
but is ther any way to do it with php files

reason is I dont want to change the code all over places .
thr should be a way to add this in header

what says

_Aerospace_Eng_
08-04-2010, 09:09 PM
Right you need to change your css and js files to use the .php extension and then change them on your pages to link to the new files. There really is no other way to do this as you want the CSS and JS files to expire and not the entire web page.

2009old
08-04-2010, 09:17 PM
good point .. :)
but my website is already using these
and firebug is only showing ...for all JS and CSs files


always thanks

miminom
08-04-2010, 09:51 PM
So why do not you just use a standard php function?
for inclusion in the text file html page? All scripts and functions of Java script will be automatically included, though will mix scripts and code ...:)

________________________________________________
prepaid debit cards (http://bestprepaiddebitcards.org)

2009old
08-04-2010, 10:14 PM
not geeting what u want 2 say ........

Thanks
ayiamas



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum