I'm developing a Web App using the cache manifest to be offline.
It's working fine, but I tried to add a no-cache directive in Apache for one of the file (the js one), to be sure the last version would be loaded each time I change the manifest file.
But actually, the js file is now reloaded every time (when the device is not offline, of course), although the manifest file did not change.
I tested it only on Safari and WebKit.
Is it the normal behavior ? I thought the manifest directive would supplant the apache one...
EDIT :
Actually, I disabled the apache no-cache directive, and my js file is still reloaded every time, despite the fact the manifest is not modified.
I don't understand. A few days ago, this JS file would never reload, even with manifest change, and now it's reloaded every time (except when the device is really offline)
So it's not really a question anymore, but maybe you'll have a lead for me...
I just read a good article on this subject.
http://www.webdirections.org/blog/appcache-not-so-much-a-douchebag-as-a-complete-pain-in-the/
It's a very particular case, but in case it happens to someone else :
I tested on Chrome, and I was working normally. So on safari, I emptied the cache, and everything return to normal. On my iPhone, I switch to airplane mode, load the site, and go back to connected mode, and it returns to normal too.
So I assume some cached files were corrupted, causing Safari to load the files each time, without issuing any error... :(
I'm not completely sure, as it was like a "phantom bug". But in case it helps.
EDIT : after further investigation, it appears the corruption came from the fact I tried to add a parameter to my jsfile, ie my file.js?v=xxx
Everytime I tried to put it back, with or without reflecting it in the manifest file, it came to this bug/strange behavior...
Related
After changing something in my website and uploading to the server, I don't see the changes in my browser upon reload. The website loads from cache. It gets reflected after I refresh the page twice or thrice.
I need help in figuring out what's wrong.
Did you cleaned your browser cache. Restart it. Clean cookies and reset your browser to fix it, This may a problem local to your own Laptop/computer, people who will be accessing your web must be getting updated content that you pushed.
The great thing about PHP is that if you have something like
clothes.com, clothes.com/men.php, clothes.com/women.php
Then if you only edit the men's page, only that particular "app" will be restarted.
But on rack/Sinatra I have to touch the restart.txt file to restart the ENTIRE website.
Is there a way around this problem, so that users browsing other parts of the site wont have any problems while another part of the site get edited?
(i'm using mod-passenger on Apache, not that it's important..)
This would be true in all cases anyway for editing (non-inline) views (not layouts).
Aside from that, if you're really worried about this then I'd suggest using versioned folders to hold the application code. When you do a deployment, change the proxy to point at the newer version. Those who had already made requests will remain on an instance of Apache and the application that is already running, as long as their request remains alive, and seemlessly (unless you've broken something with the code) move to the new code on the next request.
It's also a convenient way to rollback to the/a previous version quickly and easily.
Check out the sinatra reloader from sinatra contrib
This is a bit of a strange bug that I haven't seen before. When loading the login page for a webapp I'm working on in Safari (Mac OS 10.8.2), the entire browser crashes and quits, with the message "safari web content quit unexpectedly". I don't think I've ever seen a site actually crash a browser before, outside of an infinite loop in javascript or something (and really, it doesn't seem like it should be possible). Is there any Apache header or something that is known to crash Safari? Any help pointing me in the right direction would be appreciated.
What I've Done:
Removed all meta tags and it still crashed.
It is getting the SSL certificate before it crashes, because I got the security warning (certificate doesn't match the url, since I'm testing locally)
It's crashing almost immediately, so I doubt that there's any javascript that's causing it
Use the process of elimination. Remove some code, test app. If it doesn't work, continue removing code until you find the cause.
In case anyone ever happens to stumble across this question, the problem ended up being using CSS3 transitions in conjunction with calc() values. Apparently having them together causes Safari to crash (before the transition is even triggered, I might add). I solved it by doing some simple browser detection to add a class to the body when the browser was anything but Safari, and only do the transitions related to calc() values on elements inside that class.
I have a dynamic site I have made on PHP/MySQL and recently I have experienced a weird issue - sometimes (about once in four times) when I reload the active page the safari web browser (on a mac) automatically downloads the xxxx.php page rather than reloading it! I am trying to figure out what could be causing this, but i have no idea. Any suggestions?
The Content-Disposition HTTP Header is the only thing I can figure. Is there any way you can post something that we can test?
could it be with the .htaccess? I had a similar problem last month and I had to change some entries in my .htaccess, the shared server may have changed Apache's settings and it sopped working properly.
I am part of the developer team for a quite a large online system using ASP.NET(4).
Asp.net Ajax completely breaks down for Webkit browsers and we are getting full page postbacks when we should be getting partial only for the UpdatePanels.
I am starting to believe it has something to do with my Application Configuration, mainly for the following reasons.
If I move the ajax enabled controls to a new project they will work as expected for all browsers, including Webkit.
I created a static .aspx file with nothing but an UpdatePanel,ScriptManager and a button making a literal visible on click.
I get no Javascript errors from any browser, and i see an http request for the asp.net-ajax (ScriptResource.axd) in both Firebug and Chrome Developer tools
I tried ye'old safari fix from this highly referenced thread
Edit: After a bit more testing and http sniffing i noticed a major difference between the test application and the actual application. The test application generates 2 additional .axd files which are not generated from the actual application. These WebResource.axd, seem to contain data related to the async postback. However this is only the case for Webkit browsers. The WebResource.axd files are generated for Firefox as i can see them in firebug
What i am asking from the community, is any ideas or suggestions as to what could be the cause of this problem and if i am correct to assume that the problem is probably on the server side
Thanks for any help
The problem was due to a deprecated config file that's used to limit the content that bots/spiders/crawlers receive, which was loading by mistake thanks to our lovely inhouse CMS
In short if u get behavior similar to my case, check your or configs
I was having a similar issue however my problem was with all browsers and not just webkit. I ended up going through and tearing up the web.config file and found out that a line: <xhtmlConformance mode="Legacy"> was preventing webresource.axd from working properly. The fix was to simply remove that line from my web.config file.
For a little more information on xhtmlConformance, visit http://technet.microsoft.com/en-us/librarY/ms228268(v=vs.85).aspx.
If you scroll all the way to the bottom you'll notice it explicitly states that it causes issues with webresource.axd and scriptresource.axd.