How to cache specific resources while disable cache is on in Chrome - caching

Is it possible to cache specific resources while developing with disable cache option turned on in Chrome Dev Tools?
One might want to cache https://fonts.googleapis.com/css while testing local projects with caching disabled, for example.

You can't using DevTools. The disable cache disables the entire cache possible.
You may star a recent feature request in the Chromium issue tracker asking for just this feature. Please remember that +1, me too, and any other un-constructive comments are not needed. Simply login and click the star beside the issue number in the left sidebar. That will let the developers know others want this functionality as well.

Related

Disable Firefox Same Origin Policy without installing a plugin

Is there a way to disable the same origin policy on the Mozilla Firefox browser by toggling a flag in the browser?
This is strictly for development, for not production use.
Please note:
A similar question asked 3+ years ago yielded an accepted answer that recommends users to install a plugin. I consider this less secure and more cumbersome than toggling a flag (e.g. in the about:config, or passing a parameter when starting the browser like in Chrome).
After having tried to find a Firefox setting for various hours, and after having opened a bounty, I think the right answer to this question is:
At the moment of writing (March 2018), it is not possible to disable the same policy origin in Firefox by simply setting a flag.
I would personally recommend people to use Chrome instead for this kind of work, because disabling this setting is very easy, quick and doesn't involve installing third-party software.
There is a boolean in Mozilla Firefox that should allow toggling of the same origin policy called security.fileuri.strict_origin_policy.
Go to about:config in your browser and accept the risk:
Then search for security.fileuri.strict_origin_policy and double click it to toggle it to false like so:
I have not tested this but in my experience, this is the flag controlling the same origin policy.
Rather than directly answer your question, this alternative might be viable if you also have ownership of the server
Get your server to add the following response header. (+ Apply a DevOps process or piece of code to ensure only apply this code during development)
Access-Control-Allow-Origin
.. With the value of your origin domain, e.g.
http://example.com or alternatively * for all domains.
So I wasn't able to do this using Firefox. I was able to do this inside of chrome using the following. My purpose was for testing endpoint access to a server without CORS being setup.
google-chrome disable-web-security -allow-file-access-from-files — allow-file-access
Your google chrome executable can vary to whatever you have linked it to.
Source: https://medium.com/#siddhartha.ng/disable-cross-origin-on-chrome-for-localhost-c644b131db19

Cache issue / conflict with mobile & desktop themes - Magento Community 1.7

We’re using Magento Community version 1.7 and have a standard desktop theme and a mobile theme. We’ve added matched expressions to the General > Design > Themes section to display the relevant theme based on browser user agent.
Everything works great when the cache is switched off. However, when the cache is switched on and cleared, the theme which is loaded first gets cached. Is there a way around this? Either creating a separate cache for each theme or even switching the cache off altogether for the mobile theme?
Many thanks in advance for any advice you can give.
One way to bypass this is to leave the block cache and layouts not cached. These two are probably causing the issue to happen. This won't be that great of a performance hit since Magento is a resource hog anyway. I would recommend enabling Zend Full Page Cache and perhaps even using something like memcached or APC to supplement the default magento caching.
Hope this helps!

Browser cleanup like CCleaner using VB.NET

I'm working on a VB.NET application and I need to delete all cookies, Internet caches and auto-complete keywords from all browsers found in the system. What are the folders I should be deleting content from?
Thank you.
Install any browser you want to support in your app and then check where it stores the data you want to delete. Also check the documentation of the browser (path might depend on OS, whatever).
Since it's easy to write your "own" browser (using 3rd party rendering engine), you will never be able to support all browsers found in the system.

How can I check my AJAX for browser capable?

I always have to check each and every browser to see if my website would work. Is there a website where I can check it with?
Update:
I don't really want just screenshots (which what browsershots do), I want to actually test the posting of my script.
You want a web site to check your web site for javascript compatibility? How would you expect it to know how to exercise your interface to trigger the proper interactions? Or are you thinking of it doing some sort of static code analysis? I think you are better off coding against a framework that has solved most of the browser-dependent idiosyncrasies and using it to check for browser capabilities before you use them. jQuery, MooTools, Prototype/Scriptaculous, etc. go a long way in solving these problems for javascript.
Note that you still need to worry about rendering your site, but you already have several answers for how to go about doing that based on web sites. Personally, I just maintain IE/Safari/FF/Opera/Chrome on my workstation and do significant checking in IE/FF and basic checking in Safari/Opera/Chrome.
Even when there exist websites that allow you to see a static snapshot of your site in several browsers, you should really test your page on them yourself, because there can be subtle, and not so subtle, bugs and differences that are only apparent when interacting with the webpage.
You can cover yourself quite a lot by testing in
A Gecko engine browser (Firefox)
A Webkit engine browser (Chrome, Safari, Konqueror)
Opera
AND IE6+
John Resig recommends checking the Yahoo graded browser support documentation.
If you write unit tests for your javascript, you could use testswarm http://testswarm.com
There are multiple options:
http://ipinfo.info/netrenderer/
These site will let you run multiple browsers and version without installing. You only need to install a plugin
http://spoon.net/browsers/
There are plenty of sites, just Google/Bing for browser compatibility check.
http://browsershots.org/ is a good one.
Although most of them just take a snapshot of the site, you might have to do the manual check for things like menus and dynamic content.
BrowserShots might do what you want if you can tell by rendering a particular URL whether or not things will work as expected.
In light of your update, you could still use BrowserShots by creating a page which tests each of your scripts and renders 'pass' or 'fail' as its content depending on whether they work or not.
Failing that, Multiple IE is quite useful for running various versions of IE on one PC which can otherwise be problematic.

Website performance measurement

I need a tool to measure a website's performance that's free and does not require any changes to be made to the code (jsp asp pages). All help is appreciated.
For performance measurement I recommend you YSlow, it's a Firefox add-on integrated with Firebug, it analyzes your web pages and tells you why they're slow based on the rules for high performance web sites.
Screenshot
Also with the Firebug Network Monitoring tab, you can see which resources are taking more time and bandwidth to download:
(source: getfirebug.com)
You could also use Fiddler which will work for browsers other than Firefox. (But will not profile javascript code)
See this post
The other answers to this question focus on performance of a single user of the site from their browser's point of view. If you want to test the performance of your server, for example, to see how many concurrent users you can support, you need to be looking at tools like JMeter.

Resources