CSS/Jscript caching issue - caching

I'm pretty new to web design and have recently been working on an amatuer photography website. I updated it on Sunday night, cleared cache etc on my home computer and it was all looking fine.
The problem is when I checked it from work, behind corporate firewall etc, some of the pages have changed, some have not. For example the home page still shows old images that were replaced, whereas some of the gallery pages have new images on them but no new functionality or style (from css/js file). I've renamed the js and css file and deleted old files to try to force the browser to get a new version but it still looks like it's using old version.
I'm concerned people visiting the site will have a strange/hybrid version of the site, could this be because it's being cached on corporate server somewhere rather than on individual workstation?

Parts of the site could be being cached by your corporate server infrastructure, notably, a Proxy Server. You can check this in your headers that come from your site. A tool like FireBug or Fiddler2 should identify if a Proxy has been involved. Sorry, I don't know the exact header to look for as I don't operate behind one at the moment to try and see.
Though why only part of your site is behaving this way is beyond me. Worth checking though.

Related

Yii Website shows old pages

I am not sure why, but lately, my yii 1 website shows pages from the cache too much. Earlier, if I uploaded via FTP, it'd show the latest page. Now it doesn't do that. I also get complaints from users that they are now faced with old pages or they have problems that are later fixed with a history clear.
What could potential problems be. Can I tune down Yii caching or flush it?

Web Performance

Im working on a large site, trying to decrease the load times, and I have bumped into a rather strange issue. Im using google chromes built in developer tools, and I am finding that certain images are getting hung up, and the browser is continuing to look for them. Has anyone encountered this issue before? How do I isolate what is causing this problem?
The site runs a couple of ads, is it possible this error is occurring because of ad networks?
Here is a link to the actual problem: http://i.stack.imgur.com/IEtLA.png (updated)
If you have not done already, use a tool like http://www.webpagetest.org/ to test your site. It will test the site from nominated locations around the world, with the browser of your choice, and you will get waterfall charts for your page.
Just an idea.... If not yet done, try Google's free website testing and optimization tool 'Website Optimizer'. See what it tells you.
Another idea, try accessing the site with another browser, either one, IE, Safari, or FireFox, to see if you get the same issue; if you do then it may be the server for some reason not serving those images.
One more.... To isolate further, if possible, try using only few (one or two) images in your site/pages; if these load then add one or two more images until you encounter the issue, then that image has something and you may replace that image.

Is it safe to use code from code.jquery.com for long-term application?

I am using Ajax / jquery on a webpage i am designing... in order for it to function, i include (at the top of my page) the javascript at: http://code.jquery.com/jquery-1.4.4.js
This works great and all, but i have a fear that
1) the code might get changed without me knowing, then i encounter problems and try to debug for days / hours before finding that the code at this site changed
2) the website is no longer used / specific code no longer hosted years from now
So would it be safer to save that javascript file onto my server, and access it from there?
You should use either a Microsoft or Google CDN. It will be much faster, it will be cached for a lot of your users and it's guaranteed to be there, as opposed to the jQuery link you include.
http://code.jquery.com is jQuery's CDN (provided by Media Temple). The code at http://code.jquery.com/jquery-1.4.4.js will never change; jQuery will release a new version (which will be at a different URL), if anything needs to change (which happens all the time; version 1.5b was released today).
The jQuery guys know what they're doing, and they setup a CDN so people can easily link to jQuery. They're just as (un)likely to bring down the CDN as Google and Microsoft are at bringing theirs down.
See http://docs.jquery.com/Downloading_jQuery for more information.
Having said that, it would seem the Google hosted version (http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js), is referenced more in websites; this leads to a small performance advantage as far as your users are concerned, as the file has more chance of being cached.
It's safe, notice the version number? As jQuery is updated then that version number will change.
Of course using a CDN will always mean that it's possible for the content delivery network to go out of business. But that's the case with any non directly controlled server.
You of course could use the Google CDN for jQuery, I highly recommend it.
Relevant:
http://code.google.com/apis/libraries/devguide.html#jquery

Why sometimes, some images on my website aren't being loaded by a browser

I'm developing a web app and during the tests I noticed that sometimes browsers don't load all images (like background or some decorative images) on the website. I need to hit the refresh button to to have it fully loaded. This usually happens when the website is visited for the first time.
I suspect that maybe the development server is not fast enough and browsers "assume" that the links to images are broken because there is no fast response from the server. But I'm not sure. At the moment my development server is on a remote host inside VirtualBox with Ubuntu-server 8.04. I know that it is not the best configuration, but I'm not sure whether this is indeed the case. Or maybe it is due to some apache/php configuration parameters?
I would appreciate any suggestions or clues.
Many thanks

Website Development moving to Image Hosting

We are moving over to using Akamai for all of our large static content so far just flash but are planning to include images, css, and js files in that list.
I am curious what methods others employ to switch all of their local/relative paths to using an external hosting company. Also, how they continue to develop their site so that developers can make changes in development without it having to be pushed to their external hosting servers.
i know this question is months old. how you though about just setting up your hosts file to just point the domainname of you CDN to your local machine?

Resources