Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Browsers won't reflect changes made in html file

I am developing a web site and just ran into a very disturbing problem. My code won't refresh in any browser, meaning not just Internet Explorer but also Google Chrome and Firefox.

The thing is, in a previous version of the HTML file, I have had a div with a link in it (<a href="">Send request</a>). Today, I have changed that link into a paragraph (<p>Send request<p>).

When I load my page, it still displays the link. When I commented out the paragraph and reloaded the page, there was no link and my paragraph was checked out. I checked the source file in Chrome and yes, the source file is correct. However, the browser still displays a link that doesn't exist, and deleting the browser history didn't help.

Any ideas?

like image 259
malutan.mircea Avatar asked Feb 21 '13 18:02

malutan.mircea


People also ask

Why are my HTML changes not reflecting in browser?

Browser Cache If you are adding/modifying in-line CSS or JavaScript and not seeing the changes reflected in the HTML source, the page is likely being cached. The solution may be to purge the WordPress object cache, which stores our page caching (Batcache) renders.

What happens if the modified document is not refreshed in the browser screen?

If it doesn't tell the browser correctly that the file is outdated, the browsers won't download it again.

How do you display and view the changes in your web browser in HTML?

Right-click any area of the web page (including blank areas) and then select Inspect from the menu. Access the menu bar and click Develop, then select Show Web Inspector from the dropdown menu.

How do I save HTML After editing Chrome?

CSS changes are instantly updated but, in the case of HTML and JavaScript, you'll normally need to press Ctrl/Cmd + S to save the file to the file system then refresh the browser. Note that you can also right-click the file tab and select Save as… to save a copy of the file elsewhere.


2 Answers

You can try out the following

  1. Clear the cache of the browser.
  2. Do a clean build of the Webapp

OR

Open the Browser in InCognito or Private Browsing Mode

OR

Try to put a meta tag in your HTML

 <meta http-equiv="pragma" content="no-cache" />
like image 57
user1428716 Avatar answered Nov 03 '22 00:11

user1428716


The problem might be due to your Browser caching the HTML Page. This problem may be avoided by -

  • Clearing the Cache of your Browser

  • Try using a false query such as mypage.html?random=6 This method cause the browser to reload he page entirely on a GET request.

  • Use meta tags as below

    <meta http-equiv="pragma" content="no-cache" />
    

    This sometimes is accompanied by another meta in addition as follows

    <meta http-equiv="expires" content="-1" />
    

    It has been observed that sometimes both the above tags are ignored in IE. The suggested workaround is to use the tag twice, i.e. at start as well end of page. This is due to reason because first a 64K buffer is filled by browser on page load. if the buffer is not filled, the "pragma" is simply ignored. Placing this at end of document facilitates no-caching.

like image 33
Vikas Raturi Avatar answered Nov 03 '22 00:11

Vikas Raturi