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 8 of 8
  1. #1
    New Coder
    Join Date
    Dec 2009
    Posts
    39
    Thanks
    4
    Thanked 0 Times in 0 Posts

    how to set expiration for CSS and JS files :

    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

  • #2
    New Coder
    Join Date
    Dec 2009
    Posts
    39
    Thanks
    4
    Thanked 0 Times in 0 Posts
    http://www.quinterox.com/content/blo...ss-javascript/

    Is this a right approach to do this

    ????

    Advanced thanks

  • #3
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Yes that is the right approach.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #4
    New Coder
    Join Date
    Dec 2009
    Posts
    39
    Thanks
    4
    Thanked 0 Times in 0 Posts
    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

  • #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #6
    New Coder
    Join Date
    Dec 2009
    Posts
    39
    Thanks
    4
    Thanked 0 Times in 0 Posts
    good point ..
    but my website is already using these
    and firebug is only showing ...for all JS and CSs files


    always thanks

  • #7
    New to the CF scene
    Join Date
    Aug 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post е

    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

  • #8
    New Coder
    Join Date
    Dec 2009
    Posts
    39
    Thanks
    4
    Thanked 0 Times in 0 Posts
    not geeting what u want 2 say ........

    Thanks
    ayiamas


  •  

    Posting Permissions

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