Loading slider twice after controlling cache

I have the following code in my file .htaccess

to manage cache on my joomla site.

########## Begin - ETag Optimization
## This rule will create an ETag for files based only on the modification
## timestamp and their size. 
## Note: It may cause problems on your server and you may need to remove it
FileETag MTime Size
# AddOutputFilterByType is now deprecated by Apache. Use mod_filter in the future.
AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css application/xml application/xhtml+xml application/rss+xml application/javascript application/x-javascript
# Enable expiration control
ExpiresActive On
# Default expiration: 1 month after request
ExpiresDefault "now plus 1 month"
# CSS and JS expiration: 1 month after request
ExpiresByType text/css "now plus 1 month"
ExpiresByType application/javascript "now plus 1 month"
ExpiresByType application/x-javascript "now plus 1 month"

# Image files expiration: 1 month after request
ExpiresByType image/bmp "now plus 1 month"
ExpiresByType image/gif "now plus 1 month"
ExpiresByType image/jpeg "now plus 1 month"
ExpiresByType image/jp2 "now plus 1 month"
ExpiresByType image/pipeg "now plus 1 month"
ExpiresByType image/png "now plus 1 month"
ExpiresByType image/svg+xml "now plus 1 month"
ExpiresByType image/tiff "now plus 1 month"
ExpiresByType image/vnd.microsoft.icon "now plus 1 month"
ExpiresByType image/x-icon "now plus 1 month"
ExpiresByType image/ico "now plus 1 month"
ExpiresByType image/icon "now plus 1 month"
ExpiresByType text/ico "now plus 1 month"
ExpiresByType application/ico "now plus 1 month"
ExpiresByType image/vnd.wap.wbmp "now plus 1 month"
ExpiresByType application/vnd.wap.wbxml "now plus 1 month"

      

the cache control started working, but I ran into a problem.

Now my slider loads twice before showing up. after the image is loaded, it loads again (just like updating), but the other content is loading correctly.

Please help me.

I am using the Dj-ImageSlider extension for joomla. the slider doesn't slide anything, it just shows one image as a banner.

+1


source to share


2 answers


ETags

difficult because they take precedence for caching in most browsers. You can change all the headers you want, but if the ETag

associated file is always the same, caching will never work as you expect. In most situations, you should turn off headers ETag

.

Source - David Walsh

So, to disable ETag

you can use the following:



Header unset ETag

      

and remove this:

FileETag MTime Size

      

0


source


It is not easy to fix the problem remotely, but a few ideas you could try.

Make sure you start from scratch by clearing your browser cache and your Joomla cache first, and repeat this step after any changes below.

If the issue persists, try going to Extensions> Module Manager> DJ-ImageSlider> Advanced and change your caching setting.



If there is still no joy, perhaps play with the cache settings under System> Global Configuration> Cache Settings.

Good luck!

0


source







All Articles