Angularjs clear browser cache - angularjs

Each time i do changes in my Angular template (html file) i need to clear my browser cache and refresh the browser so the changes can be applied. Is there a way to avoid that ?
I'm using Chrome and Firefox.
Thanks

If you have the developer tools console open, then press F1 and select 'Disable Cache (while devtools is open)' (for chrome)

Related

How to disable Cache in Firefox for the localhost:3000

I have a little problem I'm working on a react app using the localhost:3000 to see the differences. But for some of the changes like the favicon, it didn't update until I clear the cache for this url in firefox. So my question is there is a way to stop firefox from saving the cache for this specific url without disabling it completely for every website?
You can disable cache temporarily by opening developer tools, press F1 to open dev tool settings, scroll down and enable Disable HTTP Cache (when toolbox is open), however this will only take effect when dev tools is open

Google cloud is caching my static files

Google cloud seems to be caching my static files hence my changes in CSS are not being reflected. How do I go about this.
Note: it's just a simple static site
Its browser issue so please clear your cache
to clear the browser cache in google chorme browser to follow this steps :
On your computer, open Chrome.
At the top right, click More More.
Click More tools and then Clear browsing data.
At the top, choose a time range. To delete everything, select All
time.
Next to "Cookies and other site data" and "Cached images and files,"
check the boxes
Click Clear data.
The issue was from the browser. I cleared the cache and everything works fine

Web site added to home screen takes to long to show updates

I made a site using React and i added it to the home screen using Chrome and it works fine, but my problem is, when make a change to it, if i access it on the web it shows right away the changes, but on the home screen "App" it takes a long time for the changes to be visible.
Is there a way to force the updates, maybe delete the cache or force a ETag change?
Thanks in advance
#Franmcod, could you try the following:
Push F12 or Ctrl+Shift+J to "Open Developer Tools" on Windows, then you can right click on the refresh icon and select 'Empty Cache and Hard Reload'. this should remove what's cached in chrome and load the newer web page after you make the changes. for Mac use: Cmd+Opt+I.
Adam

ASP.NET Core/Angular 2 - ts an HTML changes are not being reflected in any browser

I'm working on an ASP.NET Core/Angular project. I don't understand why browsers are not pulling the last version of my JavaScript. Yet when I look at the output folder (wwwwroot/ClientApp/app), all the JavaScript files and their corresponding map files are up to date.
I've pressed Ctrl + Refresh to force browsers to request newer version, but nothing is happening. They still have the older versions. Same is true with the HTML.
The MVC part works just fine, i.e. any change is being reflected by the browser.
What else can be done to push browsers to refresh the pages?
This is a common issue with HTML files especially -
While in development, you can set the browser to disable the cache when dev tools are open
1 - Right Click Inspect element OR Ctrl + Shift + I
2 - Go to settings
3 - Disable the cache when Dev Tools is open
you could also see if the checkbox is checked under network tab Also you can disable the cache under Network tab to force a refresh
after disabling the cache keep Dev tools open and refresh the page
remove your browser cookies and cache, or try this:
use another browser
change app url or port so the browser will retrieve a fresh resources

Browser Refresh Issue Angular Js

Hello everyone :)
I'm starting with angularJs but I'm facing an issue with a directive I have created.
The code is working but when I change something on the directives html code/template and then refresh the page in the browser nothing change.
The only way I have to see the changes is to restart the browser in private/incognito mode.
I don't really know how to solve this issue.
Thanks for the help ;p.
Sounds like the browser is using cached version.
In chrome:
open developer tools
Select 'Network' tab
You'll find a checkbox called 'Disable cache', tick that
This will make sure nothing will be cached while the developer tool is open
fyi
if the developer tools are open and refresh the page, the cache of chrome get cleared.
That's an option and I think it is active.
greets Christian

Resources