I am currently working with cookies on my local machine and for some reason when I try to look at the cookies it says "By default cookies are disabled for local files. You could override this by starting the browser with --enable-file-cookies command line flag". I tried going into my chrome file location, I left clicked under properties and changed the command line flag after the "target" but that didn't work. I'm not sure how I can enable local cookies at this point.
It would seem that the --enable-file-cookies flag has been removed for all platforms except android.
You can read more about it here and here.
Related
A week ago i think, I started getting warning messages in my google chrome console.
Clearing cache doesn't change anything, the messages disappear only in incognito mode.
Any ideas how to get rid of these warnings ?
I had this problem with the LastPass browser extension. I proved my theory by disabling LastPass and reloading the site in question - the warnings were gone!
I really didn't want to disable the JavaScript and CSS source maps so I have made the following change below:
Pending an update from the LastPass that addresses the issue, I have temporarily fixed this by changing one of the settings in the Extension settings for LastPass.
I had this setting previously set to On all sites, which was injecting the LastPass code on all sites blindly. With this change you need to right click on the Username/Password box to enable last pass, but on the plus side there are no warnings in the console anymore.
I consider this a temporary workaround until either Google or LastPass fix the issue.
EDIT: There is also a checkbox in the settings dialogue for the Console tab itself called Selected context only. Ticking this will remove the warnings and errors from Chrome extensions. Note this setting is not persisted - you'll have to click it each time you open the Dev Tools.
I've just used Chrome Console Filter -chrome-extension. I see everything except chrome-extension output.
For me it was the McAffee Web Advisor Chrome extension - removed and messages gone :)
this worked for me:
Find the path to the extensions. Type this in chrome: chrome://version/ . Look for the profile path. this location is where the extensions are saved.
Open the location with the file explorer. In my case it was something like (AppData\Local\Google\Chrome\User Data\Default\Extensions\hdokiejnpimakedhajhdlcegeplioahd\4.51.0.1_0) The error was with the last pass plugin.
Create the missing maps. In my case it was: sourcemaps/
Note that i only created the empty maps.
All I did is disable my LastPass extension(plugin), clear browsing data, hard reload the page and it works fine.
It might be another plugin for you
You need to open settings from the debug console
Then you disable one of chrome's option (They added it recently)
Just refresh the browser and all ready
I store some info in cookies in my Javascript code. I have had no problem to set and read them from local drive until Firefox Quantum installed.
Now it seems that the cookies are set (been checked among the cookies), but cannot be read if I open the html file. The document.cookie.length value is always zero. Yet if I set the cookies and refresh the browser (or open the file again not closing the first file) the cookies can be read.
So far Firefox stored and read cookies all right using file:///, but this twist is new for me. Some setting has to be changed, I guess.
Can anybody tell me a solution, how to allow to read the cookies again from local drive?
Thank you.
Firefox Quantum (as with Google Chrome and others) has disabled storing cookies for local files due to security issues and other problems. The HTML5 web storage commands are taking over what used to be done with cookies for both server and local web pages. See "https://www.w3schools.com/html/html5_webstorage.asp"
I have tried numerous items to clear the Javascript cache for a Sencha Touch 2 app I am developing using MAMP on my Mac. I have deleted the Chrome cache, disabled/enabled and toggled 'Disable Cache' in Developer Tools numerous times. I have also tried setting up a new host in MAMP Pro to try and force a refresh as a different domain.
Chrome refuses to clear the cache and is consistently showing old cached version of Javascript.
I have also tried the following in my app.js for Sencha Touch 2 cache disable.
Ext.Loader.setConfig({
disableCaching: false
});
I am not sure what to do next.
Trying using a timestamp... app.js?102390903452
If that doesn't work... there's something fishy going on, except the cache.
Make this steps
check the javascript path.
if you're developing on a remove server, check the connection; in any case, reconnect;
remove the file completly( make backup of course)
access javascript directly domain/files/js.js see what you get
I'm working on developing a site on my local machine (Windows 7 Ultimate x64) using WAMP, running APACHE v2.2.22, PHP 5.3.13, and MySQL v5.5.24. I'm developing using Chrome v 22.0.1229.94. I've got quite a bit of javascript in the site, however, and Chrome is relentlessly blocking javascript from running on the page.
Clicking on the little 'blocked javascript on this page' icon in the address bar includes the dropdown that has "Always allow Javascript on Localhost" checked off, and I also have a JavaScript exception in Chrome's settings explicitly saying to always allow JavaScript on 'http://localhost'.
Cookies are being allowed, "Allow all sites to run JavaScript" is checked off, and I have no idea as to why Chrome is not allowing the JavaScript to run.
Overall, it's not imperative to the project that I figure out a fix as both IE9 and Firefox 16.1 are allowing JavaScript and I can utilize them. I am simply curious if there's anything I can do to fix this in Chrome, as I would like to continue developing in Chrome.
If you notice that JavaScript is only blocked when the console is open (as some are saying), chances are that you disabled JavaScript in the console settings.
Open the console.
Click the vertical ellipsis icon (or the gear icon on older versions) in the upper right and go to settings.
See if the "Disable JavaScript" checkbox is checked.
I have the same issue, but only when the console is open. When the console is closed, JavaScript loads fine on localhost. Makes it hard to debug things though....
I got around it by opening localhost in an incognito window.
You can give your local server a domain name, may be that would help.
Open C:\Windows\System32\drivers\etc\hosts in notepad
Edit that file add a new line at the end
127.0.0.1 mydomain.com
Save, now goto chrome and type in http://mydomain.com/ this should point to your local server.
Since you nolonger run on "localhost" may be chrome will let you pass.
Let's me know if that works. Good luck!
I have made a webpage that stores cookies to remember what ID a user has put in a scheme viewer. It works in desktop versions of IE, Firefox and Chrome. But when I try to visit it with Android or iPhone it doesn't work.
What I would like to know is how you see stored cookies or how you debug JavaScript/HTML/CSS. If I look at errors in desktop Firefox I get no errors for JavaScript and CSS.
I recommend you use the remote debugger built into the chrome for android app.
e.g.
Start adb with your phone connected via usb (usb debugging enabled)
Launch chrome, goto settings, developer tools, enable remote debugging.
On your pc in command prompt execute adb forward tcp:9222 localabstract:chrome_devtools_remote
Navigate to localhost:9222 from your pc for live interaction/console from your phone.
Source: https://developers.google.com/chrome-developer-tools/docs/remote-debugging
well i believe that you can't quite view the cookies of the browser in android. are you sure you have cookies enabled? (menu>more>settings>accept cookies should be checked). or if you're using javascript to set the cookies, you'd wanna make sure javascript is also enabled.
to debug, all you can really do is get the cookies via PHP or javascript and print them on the webpage. if they're blank, you for sure know the cookies aren't there. if you wanna see if the javascript is being run at all, just put print a "hello world" to the page at the line above where you set the cookie. (same concepts for php, use an echo)
it's a little fishy that desktop works and not mobile. it could be the fact that mobile browsers aren't rendering the page correctly though this is probably not the case. i would try debugging first and see if your setcookie code is actually being called by with the mobile browsers
hope this helps!
For Android 2.2 or 2.3 you can try this:
Type about:debug in you url bar while on your page;
A javascript debug bar will be opened on top of your url bar;
Type in console.log(document.cookie) and hit evaluate > It should print the cookies
Bear in mind that the js debug bar on Android will only show once the web app logs something ( e.g. if a js error occurs or if you trigger it via console.log so you might want to trigger it inside your app to open)
For Android above 2.3 you have more debug options ;)
EDITED:
As per Zeb's answer check here: https://developers.google.com/chrome-developer-tools/docs/remote-debugging