How can i prevent input caching on web page side? Firefox cache the disabled property and buttons not work after reload. Why he doing this? it's madness!
autocomplete="off" - not work.
Cache-Control: no-store - will denied all page cache, but i need to denied only input cache.
Related
I cant use ckeditor when on cloudflare. As soon as I edit the node...I get empty wysiwyg editor. Same for comments.
And the console error is
Mixed Content: The page at 'https://www.ebdesign.com/node/add/article' was loaded over HTTPS, but requested an insecure stylesheet 'http://www.ebdesign.com/themes/contrib/at_theme/at_core/ckeditor/skins/mimic/editor.css?t=r9mmak'. This request has been blocked; the content must be served over HTTPS.
It works fine on regular hosting without cloudflare...
I'd like to speed up the initial loading of a site. It requests several API endpoints during inital render. I want to add <link rel="preload" /> for a few of these requests to make them start loading earlier. However these API responses are not cacheable by the browser. So the question is: How the browser behaves in such case? Will it fetch the content again regardless of the preload due to the no-cache headers or it's smart enough to relize that I need exactly that preloaded content?
So it turns out it's respecting no-cache headers as expected. I cannot preload such using <link rel="preload">. The solution is to add a few second TTL.
I have enable Spring Security header.
But in IE11 page is loads very slow.
It's like first full white screen comes for 1-2 sec then page is loaded.
My code is like this:
<security:headers disabled="false">
<security:content-security-policy policy-directives="script-src 'self' 'unsafe-inline' 'unsafe-eval'" />
<security:cache-control disabled="true"/>
</security:headers>
In Firefox it's working fine but in IE11 its loading slowly.
Also I checked in IE11 headers getting added in response is different. One extra tag i.e. Etag is getting added in IE11 but in Firefox it's not getting added.
What could be the reason for slowness?
clicking on a element in a page, my application change the src attribute of an img element.
I don't understand why firefox gets the images with this http headers:
pragma no-cache Cache-Control: no-cache
avoiding firefox to use his own cache.
Chrome, for example, doesn't.
Thank you
Luca
Before answer I should add some detail:
1. My application is behind Tomcat
2. I saw that that headers was added only for file bigger than 512KB
Solution was to modify server.xml in order to have bigger cache object
<Context cacheMaxSize="40960" cacheObjectMaxSize="2148" docBase="\\mypath\docbase" path="/graphics" />
see:
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Standard_Implementation
Every time I do I search on this I get information about how to disable the browser cache.
Never anything about enabling it.
How do I get the back button to use the cache and not regenerate the page?
As far as I know you can control to force a browser to reload the data by means of these meta tags:
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Expires" content="0">
but you cannot force it to read from cache. The browser itself will do that for you if you don't explicitly specify to ignore the cache, and the page data are in fact cached and not expired.
This does not depend on CodeIgniter because it's client-side, but you might want to use the meta() function included in CI's html helper, which will simply output the corresponding meta tag. e.g:
echo meta('Cache-control', 'no-cache', 'http-equiv');
would generate the second code line above.
Note:
The 1st meta tag is specified for http/1.0 while the 2nd one is for http/1.1 but both are used to allow backwards compatibility.
If you're using xhtml instead of html remember to close the meta tags with />
Browser caching has nothing to do with codeigniter. You can use html meta tags to instruct the browser specifically not to cache pages or you can set a cache expiry for an individual page like so:
<meta http-equiv="expires" content="Mon, 10 Dec 2001 00:00:00 GMT" />
You could use a bit of php to drop tomorrows date in there. The browser (depending on settings) will usually pull as much as it can from the cache automatically, including when clicking the back button - the cache for the back button will work the same as if you were coming in from any other link.
You could set expires headers through your htaccess using something like the following on an apache server (you would have to ask about how to do this on other server types) to tell the browser that is should cache certain types of content for a given periods of time:
ExpiresByType text/html "access plus 60 seconds"
This will tell the browser to store anything of mime type text/html for 60 seconds (this includes codeigniter output) BUT DONT DO THIS if your dealing with dynamic content It will stop any dynamic page content being loaded and will stop any changes to your content being loaded by returning visitors (Obviously this second part is not such an issue with a 60 second cache).
The key thing to realise is that Your page is not one thing, it's made up of lots of parts, some of these parts should be called from cache (js, css, images, etc.) some should not (often html will fall into this category).
The browser will automatically call all the parts of your page from the cache where the cache has not expired.
Usually you would use .htaccess (or similar method) to cache your css, images, etc. (using versioning in filenames to force a reload when they change).
You should also take advantage of server side caching - codeigniter does this for whole pages but I dont tend to find this very helpful for any kind of dynamic site so I would take a look at for using phil sturgeons partial caching library for ci if you are interested in ss caching:
https://github.com/philsturgeon/codeigniter-cache
This wont stop a request being sent to the server but will mean that request requires less processing and can be served as one or several pieces of static content.