cookies or cache? my own site won't load in FF without a restarting FF - firefox

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

Related

Image URL Path on server not rendered in normal window but in Incognito it is

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.

Drupal 7: Browser not displaying draggable-handles

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

Firefox wont load this page but other browsers will, why?

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.

AOL IE9/FF4 user unable to download some images (random)

I have a user on my site which (AOL + IE9) which is having issues with images on a webpage not loading. It's odd because I can't replicate the issue whatsoever. He mentions that the problem also occurs in Firefox. Basically, the page will load but some of the images on the page don't load even though the images do exist and we (and many other users) can view the pages without any problem. Also, sometimes a particular page will load images while other times it wont.
Any ideas? I've tried all the troubleshooting I can think of:
Check add ons
Has highspec computer
Check antivirus/firewall/etc software might be blocking
decent internet connection
no issues with when running a tracert
Is he behind a proxy that might block certain traffic? Does he run an anti-spyware tool which might modify his %SYSTEM32%/drivers/etc/Hosts file - and does it work if he changes that back to defaults?
If you can get him to download Firebug in Fx he can go to Net->Images which might help explain why the request for the images failed.

Why doesn't Visual Studio always render my page correctly when debugging locally in fire fox 2.0x?

When I debug locally in fire fox 2.0x many times my page won't have the styles added properly or the page will not completely render (the end is seemingly cut off). Sometimes it takes multiple refreshes or shift-refreshes to fix this. Is this a common issue or is it just me? Any solutions?
I want to add that this is happening in fire fox 3.x to me as well. I add my javascript to the pages dynamically and this might be part of the issue. This is when I am working locally with Visual Studio.
Update: This does happen in IE but it happens much more often in Fire Fox. The issue seems to be only javascript and CSS files not loading. For example I get jQuery is not defined, $ is not defined etc. I don't think I have local IIS to test this on but from the server it always works perfectly. Fire Bug shows all my css and javascript files to be requested and received.
This could be a problem with IPv6 and DNS of the Firefox browser. This issue is known to slow down Firefox on localhost:SOMEPORT. The effect would be that some external files won't load (css, js etc.) resulting in a partially rendered page.
You can solve this issue by simply deactivating IPv6 in Firefox:
Insert about:config in the Firefox address bar
Set network.dns.disableIPv6 to true or alternatively add localhost to network.dns.ipv4OnlyDomains
A different way to fix this issue, is to a remove the ipv6 address from your hosts file this way: open the file
C:\Windows\System32\drivers\etc\hosts
(with administrator privileges) and remove (or comment out #):
:: localhost
Make sure that you narrow the scope of the problem. Does the problem just happen when debugging from VS or does it also happen with local IIS? With server-based IIS? Does it happen to other developers in your company? Is it really just FireFox or does it happen to Chrome, Opera, IE, etc?
Assuming that you've already worked that all out, I would suggest installing a FireFox plug-in called "Tamper Data". Open that and refresh the page. You'll see a record of every connection from the browser to the server (for each html file, image, css file, etc). Look to see if any of the them are very slow or not completing (perhaps one of those files is taking a long time and FF is waiting for it to finish before loading other important files).
Assuming that all of the files correctly loads, you should consider checking that the syntax is valid (maybe there is some unclosed tag or quotation mark that is causing FF confusion). I use a plugin called "Web Developer", but there are a lot of other options out there.
You could also use a plugin called FireBug to view the HTML behind various parts of the page to see if there are any noticeable problems. You start FireBug, go to the HTML tab, click Inpsect, and move your mouse over something on the page, and it will show you the HTML behind it.
One thing to do would be to check the source of the page(s) in question. My guess would be that the local server that VS runs is not giving you the entire source of the page. One way to verify this would be to run exactly the same code in the debug environment, as well as from a "real" server like IIS 6. If the same behavior is seen on loading the page from both servers, as well as insuring that the full page source is being recieved by the browser(s), then it is a bug in Firefox and should be reported. This is especially true if other browsers, ie. IE, Chrome, Safari, Opera, render the page fully.
Are you comparing what you see in Firefox to what is displayed in the Visual Studio designer? If this is the case, then they are using 2 different methods to render the html and may not display the same.
Anything further on this folks?
I have examined the traffic using Firebug and it appears that when veiwing the response from the request for a style sheet, the response is just blank. After refreshing (sometimes multiple times) the age displays correctly and the response information contains the style sheet. I have not seen this in any other browser and it only occurs when viewing the app from Visual Studio.
2! Recently i had the same problem. Im using MVC 1.0 and I added a new stylesheet into Views/Share folder. And when i run the project, the page didnt render along with the css. If your web project is a MVC one so try put the css file into the Content folder.
Hope this help.
HaiVu.Doan.
In case anyone else finds this with newer versions of Visual Studio, I have to run VS as Administrator. This is something I keep forgetting to do, but once I right clicked on Run as Administrator when opening VS, the problem went away.
Initial problem, I could not get CSS to render when running a project from VS 2012 using Firefox as the browser. (IE worked just fine, btw.) The content would be there, but no CSS. This was the first post I found when I typed in my question.

Resources