Disable Application Cache in Chrome and Safari - html

I’m using the AppCache in order to enable offline access for a web app. The issue is that for development every time I make a change to my JavaScript I also need to make a change to the manifest (in order to trigger a re-download of the cached field). Now I know that in FireFox you can disable the AppCache (in fact you are prompted when you first visit the page whether to grant permission to web site to store data locally) which makes it a lot more convenient for development.
My question is there a similar option for chrome and safari?
I know that I can view/Edit the AppCache in chrome via chrome://appcache-internals/, what I’m looking for is a way to disable it.
Thanks

In Chrome, use Incognito Mode. Okay, it's probably not what it was originally intended for, but it does the job. Nothing gets cached, and now developers everywhere have a handy excuse for why they might be using Incognito Mode.
I assume there's similar 'Private Browsing' functionality available in Safari.
EDIT: I see from your comment that you want to disable Cache Manifest functionality only. Try starting Chrome from a Command Line with the --disable-application-cache switch.

Related

Chrome is not clearing cache

I am working on a new site and whenever I change CSS settings chrome will not accept those changes unless I close out of chrome completely with Task manager and relaunch it. I have a tried quite a few things. Below is a list of things I've tried:
Versioning the CSS file (I am using a PHP date stamp at the end of the CSS file
Enabling "Clear Cache while developer window is open" in the Developer console
Using Ctrl + F5 to clear cache on refresh
Going to Application and Clear Storage in the developer Console
Clearing Cache folder in local AppData
Deleting CSS file from stie, refreshing, and readding file.
Incognito mode
Adding Launch options to chrome shortcut --disk-cache-dir=null
Adding Browser Plugins to delete cache.
Anyone have any ideas how to help? It is extremely annoying and inefficient to close chrome every time I want to check a CSS change. Another annoyance is that I am trying to listen to music in the browser so if I close chrome I have to go back and get my music playing again and it's just as of now extremely annoying and way more time consuming than I want.
I've tried looking at other articles online about cache busting and other articles on Stack Overflow but I've tried to do most of what they suggest and I haven't seen any positive outcome yet. Most articles say to add some sort of random string or version on the end of the CSS file as a GET request but that isn't working though I know that has worked for me in the past.
pres f12 > f1 > network > disable cache (while DevTools is open). This should solve your problem
Development server was running various caching tools though they should have been turned off. After disabling them chrome started to work better and most of the time CTRL+F5 did the trick.
"clearing cache" is not as easy as it should be. Instead of clearing cache on my browsers, I realized that "touching" the server files cached will actually change the date and time of the source file cached on the server (Tested on Edge, Chrome and Firefox) and most browsers will automatically download the most current fresh copy of whats on your server (code, graphics any multimedia too). I suggest you just copy the most current scripts on the server and "do the touch thing" solution before your program runs, so it will change the date of all your problem files to a most current date and time, then it downloads a fresh copy to your browser:
<?php
touch('/www/sample/file1.css');
touch('/www/sample/file2.css');
touch('/www/sample/file2.css');
?>
then ... the rest of your program...
It took me some time to resolve this issue (as many browsers act differently to different commands, but they all check time of files and compare to your downloaded copy in your browser, if different date and time, will do the refresh), If you can't go the supposed right way, there is always another usable and better solution to it. Best Regards and happy camping. By the way touch(); or alternatives work in many programming languages inclusive in javascript bash sh php and you can include or call them in html.
I used to have the same problem, and I believe it's a (pretty annoying) bug with chrome. You can use the CSS Reloader Chrome Extension to solve it. Not ideal, but better
If you are trying out new CSS updates, I suggest using Chrome's "Inspect" function to dynamically update CSS settings and observe the results interactively. This may save some time during update cycles as compared to manual edits alone.
Another option to try is to define "cache-control" meta tags in your head section. For development/testing, you may want to have no caching. For a real website, you may want to have a shorter age limit. Refer to the following SO Q&A.
Using meta tags to turn of caching in all browsers?

Forget which client certificate is used by Chrome for an URL

I'm using a client certificate to authenticate with HTTPS to a website.
The first time, chrome asked me which certificate I wanted to use.
However, I don't how to flush/forget this choice to choose another certificate. Chrome remembers it and I didn't find (either in stackoverflow or chrome settings) a solution to that.
The only way I found is to open a new window in private mode.
Anyone know how to do it ?
Restarting the browser will help and ask you again.
Looking forward to see better solutions.
Open the target URL in an incognito session, and it should re-prompt. Not a great solution, but to me it beats having to restart all of Chrome, especially if you already had a lot of important tabs open.
This particular thing has sucked since the beginning of web browsers. The only solution is to use the platform APIs to build extension to manage client certificates. This is in fact what Google recommends but it's mainly for CAs and other solution providers. So the only way is to reload the browser or use incognito windows.

How to run Unsafe and Normal instance of Google Chrome at the same time?

I am doing some web development and am serving some files locally. Now both Chrome and Firefox wont allow me this because of their origin policy. As I prefer Chrome, I chose to to use it in unsafe mode by adding the --disable-web-security flag.
While this works perfectly, there is a slight issue I am facing. I can't run the chrome instance in unsafe mode while my another chrome instance is running in normal mode. If I open new instance by opening the unsafe mode chrome shortcut whilst my regular instance is running, the new instance also opens in regular mode; and vice-versa.
Is there a way to open both simultaneously? If so, how do I achieve this?
PS: I will use two different browsers for this as my last option. I would like to avoid this as far as possible
I found the answer on a Linux SuperUSer forum at
https://superuser.com/questions/593726/is-it-possible-to-run-chrome-with-and-without-web-security-at-the-same-time
I earlier thought this could only be done in Linux but this is also possible in Windows. Essentially we are asking a chrome to create a new instance altogether than sharing the same instance. We do this by giving it a location to store it's data. You can read about this in the above shared link.

Missing flags for screen capture in recent Chrome Update

I was till last month using Chrome Browser for testing the screen share feature using WebRTC API. For doing this I enabled the flag "Enable screen capture support in getUserMedia()" in chrome://flags.
Now with recent update of the Chrome Browser, this flag is no more available and most of the other WebRTC flags are disabled. I checked with even Chrome Canary and the result was same. The flags are either missing or disabled with message "Sorry, this experiment is not available on your platform.".
I am neither able to revert to older chrome version.
I would appreciate if anyone can give me a clue as to how enable the above flag for screen capture?
Thanks
You cannot use those flags any longer and there is NO WAY to access them again short of rolling back your update. They were removed for security reasons. Now, you have to use a chrome plugin to do any desktop capture. Which is frustrating but the only way and it is fairly simple.
Here is an another SO question that should give you direction.
Firefox also now has screen/window/etc capture. For now, for similar reasons to Chrome, we've put access to the feature behind a whitelist (though an extension could extend the whitelist as well; we haven't prototyped that yet).
See http://mozilla.github.io/webrtc-landing/gum_test.html (In Firefox 33 or later - currently that's Beta; no attempt to polyfill was done there as it's an internal testing page).

How to disable favicon fetching in google chrome

How can I tell chrome not to fetch any favicon.ico files from a webserver? For web development and debugging, I find this very annoying when I read server side logs. Loading the favicon is also bias when measuring and optimizing my page load times so I want to completely disabled it on the client side in chrome.
Look at this Chrome extension I hate your favicon, or build your own one, which utilizes webRequest module and trap all outgoing requests for favicons.
Also you could possibly set up one of ad blocking extensions to do the same job.
P.S. You can read discussion about whether to consider this as a bug, or feature in the issue 39402 at Chromium porject, I think it applies to Chrome as well. And it seems there will be no easy way to turn this behaviour off via options in the near future.