I have the problem that my site does not load some css and js files when refreshing the site. When I first call the site everything is fine, its just after refreshing.
http://www.benty-fields.com/
Its a bit hard to debug, since on my local host everything works fine, its just a problem on the server. I am using the free tier on AWS, but I can't find any discussion about such a problem in connection with AWS, so I guess its my site. Has anybody have seen such a problem before and can give me some tips how to resolve it?
carl
EDIT:
I use chrome Version 45.0.2454.101 (64-bit) when I get the error, but I seem to get similar errors on firefox.
The error will modify the website, since the css files are not loaded, but you can also seem them if you go to
View > Developer > Javascript console... you should see something like that
GET http://www.benty-fields.com/static/css/popbox.css 500 (Internal Server Error)
(index):192 GET http://www.benty-fields.com/static/js/spin.min.js
(index):185 GET http://www.benty-fields.com/static/js/moments.min.js 500 (Internal Server Error)
(index):191 GET http://www.benty-fields.com/static/js/bootstrap-select.min.js
It seems that website is working fine for me, please have a look into attached image and let us know your thoughts,
This is not a real solution to the problem, since I guess there is a solution on AWS itself, but for me the problem was solved by moving to digital ocean...
cheers
carl
If you're running Cloudflare, remember to clear its cache and enable development mode. This is something that used to nail me and waste hours of time when I first started running my sites through Cloudflare. Hope this helps someone.
Related
I have some 500 errors on the website that I deployed. They are very random - from browser inspect, I can see some image or javascript are not loaded. When I refresh the website, they sometimes come back. Or they are all good but when I refresh the site, some image or Js are missing. Since they come back sometime, I will think they are not permission or missing file issue. Could be the application pool not behave consistently? What can be the reason? Can someone advise. Thanks in advance!
If they sometimes work, then it's not a permissions problem, assuming that everything is hosted locally. This sounds more like a memory, network timeout, or hardware failure issue to me.
I have a WordPress website and for some reason, all the AJAX features stopped working. Auto plugin and WordPress update are turned off and I haven't made any changes. I even uploaded a backup of all theme files and still the same problem. There are no JS errors and responses are coming in as ok (no 500 errors). I have no ideas on where to even start looking. Any suggestion would be of help.
I figured it out. Somehow a <p>nbsp</p> got saved at the top of one of my php files. Not easy to find since it doesn't cause any errors.
I'm using MAMP for a local website, I have www.mywebsite.dev set up and everything works fine.
But when I try to access by 192.168.0.198 - my comp's IP, it will load the website fine, images, css and all. But it fails to load the javascript. I've checked the paths and all look fine - why would it load everything but JS??
(I need to use the IP to test over the network)
Thanks!
Thanks guys for the help, I managed to get it working by clearing the cache in my CMS's navigation section. Turned out one of the elements were not loading in quick enough. Cheers!
I'm struggling with a weird problem.
All my document.ready functionality is working when using the web page by dns.
When switching to IP the functionality breaks, but starts working after a page refresh.
Have anyone encountered this phenomenon before?
I know this is vague and apologize beforehand.
Thanks for any help!
Update:
Script has been verified to be loaded at the time when functionality doesn't work
Based on your vague question, the only POSSIBLE idea I can come up with is that some Javascript you have is now being referenced by IP address http://127.0.0.1/scripts and the scripts directory is only available via the DNS named http://hostname/scripts.
I wrote a Google Maps API wrapper in JS, did some local tests with static html, and everything worked just fine. Then I loaded the files into a local web server running in localhost:8080, tested the map panels, and once again, everything worked just fine.
Then a week went by, I added a map to a page, and I couldn't get it to load. Nothing has changed (that I know of anyway, obviously something has), and static tests continue to work just fine, but when I try to load the API from the server I get this in the debug console:
XMLHttpRequest cannot load http://maps.google.com/maps/api/js?sensor=false.
Origin http://localhost:8080 is not allowed by Access-Control-Allow-Origin.
I read a bit around, but I still can't understand the error, much less fix it. Can someone please give me a hand?
edit: I use a simple tag to load google's js. No jQuery, no nothing.
Thanks in advance!
#Santiago hopefully I can help you now :) The error you are receiving is due to Google's prohibiting of cross site scripting. You can find the info here: Google which also references:Wikipedia Article
It looks like you'll need to create a proxy service for your client on your public facing webserver. Since the request comes from your public webserver and the reply goes back to your webserver it will meet the same domain requirements that Google requires. I do not know enough python yet to create a pythonic cgi proxy but I have to think that there are many different solutions out there already. Plus you will be limited by your server as to what type of solution you employ.
HTH!
~MWR