Wordpress returning half a response - javascript

Running out of ideas that could be causing this issue so just thought I would throw it out there.
I am currently developing a site based on Wordpress which has some search functionality powered by a web service. The web service returns a load of details of various residential properties, including absolute image paths which I am requesting and caching on first request.
I embedded RoyalSlider into the page to display the images in a form of gallery. This works brilliantly locally, but the issue I am seeing is when I stick the site onto a staging server. My page just fails silently whilst loading, halfway through loading my RoyalSlider thumbnails. I have checked the raw response from the server and indeed it appears that the response just stops halfway through loading all of my RoyalSlider images. But its a 200 response, no 404's, no console errors, nothing.
Oh and I should mention that if I set a break on my loop which renders my markup, i.e limit it to say, 10 iterations, the problem does not persist and the entire page loads (albeit with only 10 of my images loaded).
Does anybody have any idea what would cause something like this to happen?
Thanks in advance

The main cause of this issue was a difference in PHP versions. This should have been one of the first things I checked, as I was seeing problems in one environment and not in another - I had just complacently assumed I was on 5.3.
The php version on my staging server (5.2) seems to have had some kind of issue with my caching layer - although what that was exactly is still unclear (leaning toward something to do with output buffering as suggested above). Updated the php version on staging though and that appears to have fixed my issue.
Thanks for the ideas Adam!

Related

403 errors on .js and .css files on first load, solved on refresh

I am hoping someone can help.
I have an issue with pages on my website returning 403 errors on some .js and .css files and images on the first load - visible in the Chrome inspect console. This causes the page to render improperly. Oddly, all the issues are resolved on a page refresh.
If I do a hard refresh, the problems reappear, if I do a normal refresh they are resolved.
I have put hours into this, but I think it may be an issue with the server/IIS, since the exact same page served from a different machine has no issues at all.
A test page on the live server that shows the errors is here: https://www.zygology.com/store/pc/web_test3.asp
The exact same page served on the test server and showing no errors is here: http://test2.zygology.com/store/pc/web_test3.asp
The actual homepage on which the errors are also visible is https://www.zygology.com and the test website showing no errors is http://test2.zygology.com
To see the issue, open the inspect console and see the 403 errors returned on the scripts that are trying to load. It happens on all browsers.
Both the live machine and the test machine are running Windows/IIS
I would be grateful for any help that can be offered.
Thanks
I had this issue in IIS 8.5 when we moved to a new server. The issue was that the IP Address and Domain Restrictions module had been installed on the new server and it was limiting concurrent requests to 5. If you have that module installed, double click it and select "Edit Dynamic Restrictions" on the right menu. In the resulting dialogue, make sure the 2 "Deny IP Address..." check boxes are cleared or that the settings are appropriate for the number of requests you expect to receive concurrently or over a period of time.

Ocassional Error loading script

I have some sites that I've been creating and they work fine but sometimes the pages will load and look like this
It'll usually work fine again if I reload the page but the problem is annoying and occurs around 20% of the time.
i went to that url and got it the first time, but then was not able to reproduce it.
do you have load sharing with multiple servers?
watch the network tab in the inspector for anything and post back what you see.

Wired png request in my asp.net

There is a simple asp.net page with all the resource stored locally. I use jq1.7.2 and bootstrap in this page.
All works fine but a wired png request.
When the page is loaded, I got this error message:
But I searched the whole project without finding any key words as transp_bg.png or api.cld.me.
With chrome debugging, I have the network request infomation as:
Where is this request from? And how could I delete it?
Page is loaded slowly as much time is wasted on requesting this png.
there are 2 too me known possibilities:
you have some tracking tool that is runing on the server it self.
That is a dynamic placeholder from some part of a framework.
But as the request takes long my gues its a trafic tracking tool.
Clean your browser cache "I recommend you use Firefox Web Developer"
Check for jquery have doubled or incompatibility issues with Bootstrap "for example old version of jquery"
Look be not getting an image URL as may be collecting information to the browser that that error. Download it.
If set photographic paper of the image is strange. Put the same icon image above

iPad not loading all HTML5 elements

I'm writing this web app, which has quite a lot of .png's on it so it is relatively heavy (5MB). The problem I have is, that iPad seems not to be loading all elements every time I start the webapp in homescreen mode.
The app is basically a bunch of DIV's with background images for them which are "nice buttons" and js code running. Suddenly the image is not loaded, so I see no button, but I can press it and the functionality is there, so my JS code is loading and working. I suspect it has something to do with having too much images, so these don't get loaded if the ipad thinks it has no ressources for them -
Does anyone had such experience?
The problem was not the iPad or HTML 5. My Webapp is loading a lot of images and on the server side I have IIS / ASP .NET in an XP machine. The MaxConnections of the IIS is set by default to 10. As it gets flooded by requests from the App, it locks randomly some images and the iPad (or any browser) cannot load them (403 error). Increasing the MaxConnections parameter to the maximum value of 40 solved the problem:
{C:\Inetpub\AdminScripts>cscript adsutil.vbs SET w3svc/1/MaxConnections 40}
Now I want to detect these 403 errors to warn user if it may still happen, but that's another story (and another question in StackOverflow)...

Application Running With SSL not loading all scripts/CSS on first visit

Hopefully this isnt a tricky one. I've got a web app that doesn't load all javascript/css/images on the first visit. Second visit is fine.
After approximately 2 minutes of inactivity the problem reoccurs.
These problems only started occuring after the customer requested SSL be applied to the application.
Ajax requests stop working after 2 minutes of activity despite a successful page load of all javascript elements.
Application timeout is 30 minutes - like I said, everything was fine before SSL was applied.
All javascript and CSS files use absolute URLS - e.g https://blablabla
There appears to be no pattern as to why certain files arent loaded. The firebug Net output shows the status for the failed elements as 'Aborted'. For example, site.css and nav.css are in the same folder, are declared after each other in the head tag yet one is loaded and the other is not. Both will load fine after refreshing the page (unless roughly two minutes have passed).
An Ajax request also shows as aborted after two minutes. However, if i do the request again the Ajax request will succeed. Almost as if the first request woke something up.
None of these problems occur in Chrome
Any ideas? :)
FYI this is a .Net 4 C# MVC app running under IIS7 but I'm not sure its relevant since it works in Chrome. Everything worked fine before SSL was applied.
Removed SSL across the board and secured action methods with [RequireHttps]. Then changed the scripts and CSS in the master files to point to absolute HTTP urls. Javascript then worked fixing the ajax.
If anybody has any idea why CSS/Javascript broke over SSL it would be cool. Im guessing it's perhaps the work load? Since it worked the second time I'm guessing half the CSS and scripts were cached making less of a workload over SSL?
Anyway, working now!

Categories