I have looked into the cache-busting feature of  Apache2 Webserver.

I have an Ubuntu installation of Apache2.

There wasn't  the expires module installed  by default so I rectified that
situation  with

$ sudo a2enmod expires

I now have expires.load but not a corresponding expires.conf in the
/etc/apache2/mods-enabled directory

unlike all the other enabled modules.

I think I need to manually create expires.conf then copy & past this file
https://github.com/h5bp/server-configs-apache/blob/main/h5bp/web_performance/cache_expiration.conf

Then add the line
    ExpiresByType text/css                            "access"

in section
# Specific: Documents

or both sections
# Generic: Data

Finally run

To reload Apache and apply the new config

apache2ctl reload

I don't think if I run
$ touch expires.conf
in the directory  /etc/apache2/mods-enabled to create the missing file
will *work*  because

the command ls -l shows that all the .conf symbolic links to
/etc/apache2/mods-available.


*What is the correct way of creating the file expires.conf  ?*


https://www <https://Backbutton.org>.backbutton.org
¯\_(ツ)_/¯
♡۶♡ ۶♡۶

<http://www.backbutton.co.uk>


On Thu, 9 Feb 2023 at 10:22, Florian Schwalm <f...@flo-films.de> wrote:

> The way you describe this your style.css is cached by the browser. You can
> verify this by opening the developer tools in the browser, then load the
> page and check the details in the Network tab. If that is indeed the case,
> "the world" will be able to see your changes exactly once and then stick
> with that version until the cached value expires.
>
> I suggest you read up on how caching in browsers works as well as what
> cache busting is. Then decide for a workflow and server configuration that
> suits your use case.
>
> Once you understand the concepts, here is a good starting point for some
> sensible configuration options:
>
> https://github.com/h5bp/server-configs-apache/tree/main/h5bp%2Fweb_performance
>
>
> Am 9. Februar 2023 05:52:19 MEZ schrieb Zahid Rahman <zahidr1...@gmail.com
> >:
>>
>> It is working now on my PC  browsers.
>> It took some time though.
>> To see the changes in chrome  I had to press  ctrl +F5.
>>
>> Simply pressing The refresh button was doing it.
>>
>> It still a mystery why any  text  changes are shown up immediately but
>> the changes in style.css took so long.
>>
>> Anyway  I am relieved you can see the new changes so the world can see my
>> latest changes.
>>
>> I am still seeing old  branding image  , the mark tag is still in default
>> yellow on my android phone browser no matter how many times I refresh it.
>>
>>
>>
>> On Thu, 9 Feb 2023, 04:22 😉 Good Guy 😉, <xfs...@hotmail.com> wrote:
>>
>>> On 09/02/2023 01:52, Zahid Rahman wrote:
>>> > Hi,
>>> >
>>> > I made these two changes in my style.css but they not being picked up
>>> > by Apache webserver.
>>> >
>>> > mark {
>>> > Â  Â  background-color:powderblue;
>>> > }
>>> > #showcase{
>>> > Â  padding-top: 100px;
>>> > Â  min-height: 280px;
>>> > Â  background:url('../img/1kzsc7ag1v0fivg5ui5l.webp') no-repeat
>>> > -000px;  <!-- Just the image   -->
>>> >   background-size: 1500px  375px;
>>> > Â  text-align: center;
>>> > Â  color: #ffffff;
>>> > }
>>> >
>>> >
>>>
>>> I can see the styles are working in Firefox. Have you refreshed the page
>>> or cleared the cache and try again?
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
>>> For additional commands, e-mail: users-h...@httpd.apache.org
>>>
>>>

Reply via email to