即使重新安装后,Firefox也会为img元素加载旧的src url

问题描述 投票:0回答:1

在我的项目中,我更改了一些细节:

  • 1)删除带有徽标图像的文件夹。
  • 2)更改与图像新位置相对应的srcimg属性。

旧src:“ images / logo / logo.png”。

新src:“ images / logo.png”

但是当我加载页面时,我在徽标应显示的位置看到一个“空”图标。我试图删除缓存,甚至还重新安装了Firefox。我还尝试切换防病毒软件。但是,当我打开调试器时,看到的是src的旧img值。如何在Firefox中更新图像?

这里是代码:

<nav class="col navbar navbar-expand-md mx-auto py-0 align-items-end justify-content-between">
                <a class="navbar-brand p-0 ml-5" href="#"><img id="logo" src="images/logo.png"></a>
                <div class="menu-icon-wrapper d-flex position-relative justify-content-center align-items-center mr-5">
                    <svg class="blue-triangle d-block position-absolute" width="60" height="60" viewBox="0 0 60 60">
                        <polygon points="0,20 40,60 54,6" fill="#00ff65"/>
                    </svg>
                    <div class="open-close position-relative">
                        <svg class="position-absolute" width="100%" height="100%" viewBox="0 0 60 60">
                            <polygon points="0,20 40,60 54,6" fill="#00b4ff"/>
                        </svg>
                    </div>
                </div>
            </nav>

更新:其他浏览器也看不到该图像。我加载页面区域设置。

html image firefox src
1个回答
0
投票

您提供的有关情况的信息看起来太少了。

我想您已经直接在HTML文件中更改了源。如果是这种情况,请打开网络监视器,然后查看是否已缓存HTML文件。

  • 按Ctrl + Shift + E(在Mac上为Command + Option + E)。

  • 从Web Developer菜单(在OS X和Linux上为Tools菜单的子菜单)中选择“网络”

如果该页面托管在服务器中,请查看您的服务器或CDN是否已缓存该页面。

希望有帮助。 !!

© www.soinside.com 2019 - 2024. All rights reserved.