KrmX
KrmX

Reputation: 113

When making changes to HTML or CSS, they are not visible on the page

When I make changes to my web page, the end user can not see the update until it clears the browser cache, uses the incognito mode, etc.

There will be some solution so that when making changes in HTML or CSS these are reflected immediately upon entering the web without needing to Clean Cache, enter Incognito Mode, use the Network / Disbled Cache of google chrome (which does not work most of the times) or install an extension to clean the cache ??

Upvotes: 2

Views: 690

Answers (2)

Peter
Peter

Reputation: 624

You can version your CSS and JavaScript source files to prevent the user from having to clear cache each time you make an update. Just add on ?v= on the end of your filename and include the version number.

Example:

<link rel="stylesheet" type="text/css" href="style.css?v=12345678" />

Upvotes: 1

Maarti
Maarti

Reputation: 3719

You can press Ctrl + F5 to force a cache reload when refreshing the page.

Wikipedia:Bypass your cache

Upvotes: 0

Related Questions