test
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • blandine.escoffier@isobar.com Friend
    #1024901

    how can we send assets expiry headers with the assets

    blandine.escoffier@isobar.com Friend
    #1025423

    how can we send expiry headers of a assets during sync so that it uses browser catch, Eg : max-age,

    so that asset has an expiry time when catches in browser through CDN.

    this is effecting my site performance results and because the assets are coming through CDN HTaccess on server will not work, AWS documentation says the headers sent during sync will be used,

    so, how can we sent the expiry header with the plugin.

    Mo0nlight Moderator
    #1025696

    Hi.

    Open the file :
    administrator/components/com_jaamazons3/controllers/localrepo.php

    Look for (show up 2 times)

    $s3->putObject([
    .....
    ]);
    'CacheControl' => 'max-age=172800',
    'Expires' => 'Thu, 21 Mar 2042 08:16:32 GMT',

    change the number and the date to what you want.

    Do the same with file:
    /administrator/components/com_jaamazons3/controllers/repo.php

    Look for. (show up 1 time)

                        $opts = array(
                            'Bucket' => $bucket->bucket_name,
                            'Key'    => $filename,
                            'Body'   => $content,
                            'ACL' => ACL_PUBLIC_READ,
                        );
    
                        // Upload an object to Amazon S3
                        $result = $s3->putObject($opts);

    Add the code to.

    $opts = array(
    .......
    'CacheControl' => 'max-age=172800',
    'Expires' => 'Thu, 21 Mar 2042 08:16:32 GMT',
    );

    Do the same to the file: (show up 1 time.)
    /administrator/components/com_jaamazons3/controllers/file.php

Viewing 3 posts - 1 through 3 (of 3 total)

This topic contains 2 replies, has 2 voices, and was last updated by  Mo0nlight 7 years, 8 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum