Ok; I'm stumped on this one. This regards the built-in draggable sort functionality you use for basic blocks or organizing books. I'm using the latest Firefox on Fedora 20. I also use profiles, meaning different instances of Firefox with separate caches and add-ons. However, in both profiles, I am logging into my Drupal site with the same credentials.
The Problem: For the last few days my primary browser has suddenly stopped showing the draggable handles in any primary Firefox profile. Inspection of the code shows that they are receiving a "display: none" element style in every case. However, this is happening only in one of my Firefox profiles. If I could even duplicate the problem in my other profile I'd have some clues, but I can't get them to disappear there any more than I can get them to come back in my primary. Remember, I'm logged into my Drupal site as the same user in either case, so it shouldn't be a permissions thing.
Things I've tried so far:
disabling all add-ons
Clearing all memory and caches. Again, and again, in conjunction with everything else I've tried
Clearing all Drupal caches
Force-refreshing the pages (shift+r)
You can see the problem here; it's not even a stylesheet thing, but something effecting generation of the drag-handle elements to apply a "display:none" to them.
See my firebug comparison screens attached.
EDIT I "cloned" my profile by creating a new Firefox profile and syncing everything (addons, history, etc); the new profile does NOT have the problem.
After clearing my cookies (a separate operation from all the cache clearing), it was fixed. I am still perplexed by why there should be a cookie with the power to toggle draggable blocks, but there we have it.
Solution: Clear Cookies
Related
I have an unusual problem that I can't wrap my head around and figure what is causing this and how to tackle it.
I've created a webpage that allows image uploads to the server! After the user uplaoded an image the host of the page receives an e-mail with the path to the uploaded image - really straight forward.
In the e-mail for instance a url like this is coming in.
https://www.something.com/uploads/FB_IMG_1525868856883.jpg
I can open that in Safari on Mac, I can open that in some cases in Chrome Incogntio, but it never renders in Internet Explorer or normal Chrome Window (in Incognito it does)
In the image you see something weird happening. In Incognito a different source is rendered than in a normal chrome window. (this is btw. not a caching issue)
you also see the page-title of the actual website resolved in the normal window, but not in incognito.
Why is that happening? What could cause that? is that some server setting? Some react setting I have to set?
I'm posting this in case someone else runs into it as well. I ran into this same issue where 500 kept happening for me and I knew it was not the extensions.
What fixed it for me:
Open Developer Tools in Chrome
Navigate to Applications Tab
Click "Clear Storage
Click Clear Site Data
As Nitish Phanse said, it is because the page is cached. Turning off browser caching will solve it.
I faced a similar problem, when any of the changes in CSS were not being reflected in the webpage, because the cached version was being used by chrome. However, the changes were visible in other browsers and devices. Turning off caching in chrome solved this problem for me.
I prefer to use incognito mode when developing website because when browsing normally the files are cached, thus, not reflecting the changes you made. When you use incognito mode, fresh cache and cookies are stored and the cache and cookies are disposed when you close the incognito window. Another plus point of using incognito mode for testing is that, it disables all the plugins, unless you explicitly enable them.
You might want to check out this question on Quora for further details on why to use incognito mode when developing websites.
Seems like you use quite amount of Chrome plugins. In Incognito-mode those are disabled by default. Try remove/disable AdBlock etc. stuff which blocks scripts and disallow them from running.
Makes quite a lot sense why they run in other browsers too.
I strongly recommend to NOT use plugins when you do web development. You might see different kind of behaviour with same code as user who do not use them. Only use this approach if you especially wan't to develop under certain conditions.
As most people suggest, it definitely sounds like a caching issue. Incognito doesn't load the page with cache. You could ctrl+f5 the page (reload without chache) and see if it still does it. If the caching itself proves to be an issue, you could add a ghost/phantom string (I don't know if that's the actual correct terminology). Basically you add,
<?php echo '?'.date('Y-m-d H:i:s'); ?>
at the end CSS or JavaScript import (whatever may cause the issue). I.e,
<script src="/js/regexps.js<?php echo '?'.date('Y-m-d H:i:s'); ?>" type="text/javascript"></script>
What this does, is that it will prevent people from caching your file, since the name of that file will change by the second. This way, you make sure that if you make changes to files that are often cached, that everyone gets the uncached changes as you update your CSS/JavaScript or whatever. This is very useful for files where you make JavaScript check for instance, in case you make changes to some regex etc.
If content scripts are specified in manifest.json for Firefox, Firefox will also load content scripts for already opened tabs and execute them even the tabs are already in loaded and ready state.
Google Chrome does not add any content script when extension is installed for already opened tabs. The content script is loaded when the page is refreshed for the older tabs.
I want to ask is Firefox's behavior is expected or bug?
As far as compatibility goes, it's a bug.
Chrome does not do that.
As a result, many extensions implement custom logic to achieve the effect.
One has to take into account side effects. Suppose your content script injects some UI into the page. Then the extension is updated. That amounts to extension restart, and suddenly you have 2 copies of the UI. Also valid if you just attach event listeners, as (at least in case of Chrome) the old content script's context continues to exist (in an "orphaned" state).
The last point is very important and probably the reason why Chrome doesn't do it by default. At some point I made a very long post about this problem - if you're going to report this as a bug to Mozilla, please include that. There's also this feature request that is related.
What would be sensible (and backwards compatible) is to add a parameter to content script description in the manifest - whether to inject into existing pages. It will be up to developers to guarantee that side effects are taken care of. This usually requires even more code to just communicate to the old script that it needs to wind down and clean up.
This is driving me crazy. This website and its pages work perfectly in IE, and Chrome but in Firefox 5.0 it frequently won't load the belts and bags page and the only way to get it to load is clear my cache/history.
http://www.urlgone.com/0ad9a6/
If you click around four times on the Bags link, then the belts link, then the Bags, then the accessories link it usually won't load. Another testing process is when you click Belts or Bags twice each then hit refresh it gets stuck and never loads or eventually after a long wait does. It seems to do this on either Belts or Bags but its
not always the same page that has problems.
Can anyone give me a clue what the problem is?
I figured the problem out. Its more specific to my individual situation i guess. I thought maybe my problem was the word press include header file but I was wrong. It appears to be permalinks. I changed my perma links to default and it worked. Next I did a restart with Firefox in Safe Mode using pretty permalinks (not default) and it worked fine. So ultimately the problem in Firefox is an add-ons in combination with the permalink somehow. I found the culprit add-on is HTML Validator 0.9.0.6. I'm not sure why this is the problem but appears it is.
Over the last few days, I've noticed that (occasionally) when testing my own site in FF, it loads the first time that FF has been opened, but it seems to hang on subsequent loads (windows only - i haven't noticed this behaviour on mac, but i don't use my mac as much).
The url is http://HearWhere.com
Of course, my concern is that sometimes people will try to get to the site and not be able to (and based on what I can see, that is a distinct possibility, as i've seen a significant drop in stats over the last few days, so I suspect that might be happening).
Any idea why? I can't seem to figure this one out.
I view source on the page that hasn't loaded, and it appears that all the source is there.
The one thing I can think of that might be causing the problem is that in my head and footer, i have a bit of PHP which attaches the correct API key based on the visiting domain (this is so I don't have to hard-code the api key into the page and change it from dev to prod).
i use a fairly simple
$domain=$_SERVER['SERVER_NAME'];
if($domain=='dev'){
$apiKey='apikey';
}else {
$apiKey='apikey2';
}
but when viewing the source, it appears that show without issue.
I do a similar bit of code at the bottom of the page so I only include tracking codes when the domain is not dev.
Any ideas?
UPDATE --------------------------------------------------------------------
After checking it out in Firebug (not sure why i didn't check that before), the following two google scripts are failing, and everything stops there.
The site is map/location centric, so there i need the google stuff. Any idea why it would fail?
these are the failing scripts
http://gg.google.com/csiv=2&s=mapsapi&action=jsloaderjslinker&rt=jsload.69,jseval.103,jsdone.105
http://gg.google.com/csi?v=2&s=mapsapi&action=apiboot&rt=d.2,e.316,ab1.336
Have you tried Firebug plugin for Firefox? It could help you debug some script/network/html issues.
You can monitor script, images and other ressources load time.
Good luck.
It appears this was/is an error with Firebug. Disabling firebug resolves the issue, so it shouldn't affect too many visitors.
Thanks for the help,
Pete
I use Firefox to develop a web site and at the same time to browse the web, read my gmail, etc.
The problem is every now and then I need to delete the cache and or remove the cookies of the web app, but I want to stayed logged in in the other web pages I am visiting.
Do you know a Firefox plugin (or Firefox trick) that can help with this issue?
Preferences → Privacy → remove individual cookies
They are grouped by domain, and you can eliminate all cookies from selected domain with one click.
Update:
Option → Privacy → remove individual cookies
There are two add-ons for FF that every web developer needs and they are Web Developer Toolbar and Firebug, the Firebug extension YSlow comes in very handy too.
Web Developer Toolbar has great cache and cookie control down to individual cookies. Firebug lets you mess with the DOM and CSS directly for a page and YSlow is good for page weight and response times.
Be careful having Firebug enabled for JavaScript heavy sites as they really slow down. GMail will warn you about this and tell you to turn it off. I have had a problem trying to disbable sites with the menus when the tool is embedded in the browser at the bottom but opening it in its own windows the sites menu works fine.
I personnaly also like IE Tab which means I can quickly view a page in IE without leaving FF and I can also get it to load anything that only works in IE with it.
Cookie Monster might work?. Also, have you considered just using two profiles in Firefox? You could setup two profiles with two icons and use one profile for the website and the other for the non-development. The only problem would be you can only have one open at once.
Also, two browsers (Chrome, IE, Firefox, etc) might work well too.
WebDeveloper extension allows to delete cookies for domain. It also can clear cache, although for me Ctrl-F5 is enough usually.
I had the same problem and found a firefox addon to remove the cookies for the current site that you are displaying:
https://addons.mozilla.org/en-US/firefox/addon/remove-cookies-for-site/
Using that I don't have to navigate the firefox menus to find my site in the list (which was too time consuming). This does not cover the cache-issue. For that there is the Ctrl+F5 other people have mentioned. It is covered in good detail here:
What requests do browsers' "F5" and "Ctrl + F5" refreshes generate?
Best solution:
1) Just Click CTRL+H and search the site.
2) right click on it and choose Forget About this site
(source: https://superuser.com/a/733154/249349 )
If you would like to use firefox, clear cache and cookies for one domain and stay logged in (and retain cache) at other sites, you could run a second firefox profile concurrently using the '-no-remote' parameter. I use this all the time to view sites I am building from an anonymous and administrative perspective at the same time.
One way to do this (in windows xp) is: make two profiles, then startmenu->run type 'firefox -profilemanager', untick the 'don't ask next time' box and load profile 1, then startmenu->run type 'firefox -no-remote' and load profile 2. You should now have two seperate firefox profiles running.
Clearing cookies for a single domain is easy with any one of a number of tools. Clearing the cache for a single domain or at the individual page level is sometimes useful, but hasn't turned out so easy for me thus far.
One specific situation is changing a meta redirect, where you can't just ctrl-F5 (you're being redirected, after all). Using a different profile isn't an acceptable general solution. Web Developer toolbar can disable the cache to test that the change is working but it's only a temporary fix, and not one that can readily be suggested to a client in order for them to view the change.
I use SQLite Manager for firefox to remove single sites from cache. All you have to do is open places.sqlite in your user profile folder using this plugin and remove the site. It's not exactly an easy solution but it does work. Make sure you backup your profile 1st!
Ross, I have the perfect answer for you. Get on the current tab that you want cookies cleared. Click tools > Page Info. Or install Page Info Forms & links for a shortcut. Then click the Security Tab. Then View Cookies button. It will bring up all the cookies for the relevant domain. Click the ones you want to delete, and click remove.
Seems we have cookies covered here.
As for cache, the trick is to make your development server force a refresh.
In httpd, you probably have some some cache directives to swap out for these:
Header set Cache-Control "no-cache, must-revalidate"
ExpiresActive On
ExpiresDefault "now"
In header:
<meta http-equiv="cache-control" content="no-cache, no store"/>
The benefit of doing it the httpd way is that your scripts/images/css get refreshed.
In that way you are not restricting yourself to just browser with web developer toolbar, you can use other browsers such as chrome that does not do the no-cache thing so easily.
Another extension that handles the cookie part of the question with a little more ease than the rest is Close'n forget
https://addons.mozilla.org/en-US/firefox/addon/closen-forget
You can use it by toolbar button/context menu/keyboard shortcut in order to close the current page, discarding any cookies it held.
Optionally, the site can be removed from browser history and (again optionally) all the pages you visited in the current page can be removed from browser history too.
Simple solution is simple - use two different browsers.
Say chrome for your email and Firefox for dev.
Also, you have Cookie Swap. but it doesn't really work quite as smoothly as you'd like.