缓存控制后滑块图像加载两次 [英] slider images loading twice after cache control

查看:16
本文介绍了缓存控制后滑块图像加载两次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的 .htaccess 文件中使用了以下代码来控制 joomla 站点中的缓存.

I have use following code in my .htaccess file for cache control in 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"

缓存控制开始工作,但我遇到了问题.

cache control started working but i am facing a problem.

现在我的滑块图像在出现之前加载了两次.加载图像后,它会再次加载(就像刷新一样),但其他内容加载正确.

Now my slider image is loading two times before appearing. once image is loaded then it again loads ( just like refresh ), but other content is loading correctly.

请帮帮我.

我正在使用 joomla 的 DJ-ImageSlider 扩展.滑块不会滑动任何东西,它只是将单个图像显示为横幅.

I am using DJ-ImageSlider extension of joomla. slider does not slide anything, it just show a single image as a banner.

推荐答案

远距离排除故障很困难,但您可以尝试一些想法.

It's difficult to troubleshoot at a distance, but a few ideas you could try.

首先通过清除浏览器缓存和 Joomla 缓存确保您从头开始,并在以下任何更改后重复此步骤.

First make sure you are starting with a clean slate by clearing your browser cache and your Joomla cache, and repeat this step after any changes below.

如果问题仍然存在,请尝试转到扩展 > 模块管理器 > DJ-ImageSlider > 高级并更改缓存设置.

If problem persists, try going to extensions > module manager > DJ-ImageSlider > Advanced and changing the caching setting.

如果还是不开心,不妨试试系统>全局配置>缓存设置中的缓存设置.

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

祝你好运!

这篇关于缓存控制后滑块图像加载两次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆