I know this question is rather strange ,so let me explain. I got an html5 application, an avatar that answers questions. However, while not busy, i want my avatar to display a waiting animation. Got my video, and it works just fine, but it is a 2 secs video that i want to access without asking the server every time i have to play it, its just too much traffic. What i want is to download it once, and then be able to play it every time i need. Is there anyway to cache it? Other solutions are wellcomed too ^^.
Thank you guys
I am not sure if that works, but you can try using cache manifest. Here is info on how to use it: http://www.webreference.com/authoring/languages/html/HTML5-Application-Caching/
Briefly:
<!DOCTYPE HTML>
<html manifest="manifest.cache">
....
manifest.cache
#What to cache for reuse
CACHE MANIFEST
index.html
stylesheet.css
images/masthead.png
scripts/misc.js
#What to cache in case network goes down (if network is up it will still try to load it from net)
NETWORK:
search.php
login.php
/api
#What to show when resource is not cached and no way to load it
FALLBACK:
images/dynamic.php static_image.png
Related
I have just started developing for a few weeks now and I bought a domain, but when I upload the files on live, the website looks different than what I have uploaded. Now, this gets fixed when I clear my cache. The problem is that my visitors enter, they see the page in a way, and after I update it they see it as the previous version!
Is there any possible solution for this? I don't want my visitors to clear cache every time I make a change on my website!
This is quite probable to be due to css cache. Your server is loading a cached version. You can specify the cached time in a few ways. Etags and htaccess (on apache) are the most common.
A very simple trick is just to add at the end of your style link url (where you load your main style in the head of the document) a get-like parameter: just like this:
main.css?v=2
I have a strange issue with google page speed insights. I am receiving this error even though I have moved all my scripts to footer, and critical css is inlined in header. Mobile results are very good, and desktop is receiving this error. anyone has some idea on how to solve this?
This is the url for test: google page speed insights
I had a look at the source for the URL that you provided and it seems like there is a script tag inside the HEAD.
<script>
sessionStorage.setItem('BASEURL', 'http://test.bigcat.rs/mirokredit/wp-content/themes/mirobuild');
sessionStorage.setItem('LANG', 'de');
</script>
You should also move that to just before the closing BODY tag add the "async" attribute to the tag. It will notify the browser to run the script asynchronously as soon as it becomes available and remove the blocking.
Hope that helps!
I have found the problem and the solution! In my original css I have a BG image for top content on desktop. In critical css I have included only bg-color and I wanted to serve this bg-image later. Once I have included bg-image in critical css( in header) desktop results improved and render blocking script error message disappeared. Google pagespeed insights examined the final result picture with the one generated with only critical css, And it found out that the pictures were not similar enough, and That's why it said that I had blocking content.
I am using cloudflare, W3 Total Cache, and amazon s3. I am using database, page, object, and browser caching via W3TC.
What causes the delay in receiving data from the server as seen here? This is incredible, I feel it might have been faster without W3TC installed.
Screenshot of headers
A couple of thoughts.
It looks to me like there are two 404s on the home page, so probably good to get them fixed:
http://cdn.thedigitalhippies.com/wp-content/themes/sahifa/fonts/BebasNeue-webfont.woff
http://cdn.thedigitalhippies.com/wp-content/themes/sahifa/fonts/BebasNeue-webfont.eot?
There are 20 odd CSS files on the page and plenty of js files. I think you would get good improvement if you combined and minified these into single CSS and JS files with somthing like http://wordpress.org/extend/plugins/wp-minify/
Hope this helps!
Every time i update my website system UI/Jquery,
users complain that things are not working for them and that they have bugs.
Users are internet/computer dummies so they don't know how to clear the cookies or the cache of the browser, so i need to connect to each one of their computers and do it myself.
I spend lots off hours doing it and they always complain.
Some of the users use Chrome, some Firefox.
Googled and found no solution for this.
Is there any client code operation that will command the browser to clear its cache
or even pop up browser window which will ask user to confirm the clear?
Regarding cache clearing: No, there isn't.
What you can do, however, is configure your web server to correctly serve expiration and cache validity headers for your content. (How to do this depends on your web server.)
You can also use "cache busting" versioned URLs. Instead of using, let's say,
<script src="script.js">
you can "version" the URL like this:
<script src="script.js?2012-12-03-13-06">
<!-- or instead of dates any other versioning scheme you like -->
and when said script is updated, also increment/change the query parameter accordingly. This should cause browsers to consider the script as new as the URL isn't found in the cache.
document.cookie = '';
With browsers that allow entering js code in the address bar you can simply make a shortcut lets say a favourite with the following code as a url:
javascript:document.cookie = '';
If you'd like to clear cache you can use meta tags not to cache the site, though caching is conciderable.
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
I'm totally stumped here, so any ideas would be appreciated.
I have a RichFaces application, which recently became non-functional when used from IE6. The problem began when I included the following line in my main template:
<a4j:loadScript src="resource://jquery.js"/>
This results in the following generated HTML:
<script src="/AgriShare/a4j/g/3_3_3.Finaljquery.js.jsf" type="text/javascript"></script>
By "non-functional" I mean that pages no longer load, b/c the first page appears to hang the browser for a long time, and then all references to jQuery say that the object was not defined. Eventually this appears to put IE6 in a state where further clicks do nothing.
After a lot of trial and error I have established the following:
The app still works in Chrome, Firefox and IE8
The app still works in IE6, if I switch to HTTP. So, the problem appears to be related to HTTPS, which I can't dispose of.
I further narrowed down the problem by trying to manually request 3_3_3.Finaljquery.js.jsf in IE6 address bar. It asks me if I want to save the file (so it can see it is there), but when I say 'Save', it hangs for about 5 seconds and then says:
Internet Explorer cannot download 3_3_3.Finaljquery.js.jsf from [host_name].
The connection with the server was reset.
Doing the same download over HTTP succeeds.
Gradually reducing the size of the file, I noticed that the download eventually succeeds over HTTPS, if I get the files size below ~ 110KB. There is no specific size it works at though. I tried the same trick with prototype.js and it worked at a different size value.
I can't trace the SSL session, b/c I cannot get access to the certificate's private key, so now I have absolutely no clue what to try next.
Any ideas would be greatly appreciated.
Try using Fiddler for debugging. It can handle SSL.
You might also want to consider hosting the server yourself and taking a look at the server log.
The problem was solved by turning off compression of javascript files in Web Cache.
Sounds like the problem might be related to this: http://support.microsoft.com/default.aspx?scid=kb;en-us;327286