Prevent Firefox from caching localhost? - firefox

I've been curious to try switching to Firefox Quantum from Chrome, but for web development have hit a major obstacle that I have not been able to easily resolve –– it's caching my localhost files so when I attempt to load various ember applications at localhost:4200 I end up viewing a cached application different than the one that is currently running.
Is there a way to disable caching for localhost in Firefox? And/or how to developers normally work with Firefox in this regard?

And/or how to developers normally work with Firefox in this regard?
I tend to use CTRL + F5 to do hard reload (ignores cache). Pretty standard for all browsers.
Since there is no native way to configure for individual domains, you could write a Browser Extension that can intercept responses via the webRequest API (see for example onHeadersReceived) by overriding cache headers for a selected domain (you may even be able to find one already in existence).
Or simply configure settings in developer tools to ignore cache when toolbox is open:
There is also the Forget Button that can be dragged into the toolbar from customize.

Set the HTTP Cache-Control response header to max-age=0 in your application.

Related

Which are the best extensions for use Facebook and stop the cookies and tracking?

I ´m trying with Ad Block Plus, Ghostery, Disconect and Self-Destruct Cookies in Firefox.
Can you recommend some tips to stop the tracking?
The "Do Not Track" feature in Firefox is useful for telling sites that you do not want to be tracked. A detailed guide on enabling this feature is available on Firefox's support page : http://mzl.la/WL6fUP .
Besides, if you want an extra level of security, I would suggest you to use the "NoScript" browser extension(https://addons.mozilla.org/en-US/firefox/addon/noscript/). NoScript blocks JavaScript and other executable content on website thus effectively protecting you from tracking codes on websites.
And if you want real privacy use a proxy or VPN. Another good idea is to use the tor browser ( torproject.org/projects/torbrowser.html.en).

How to disable cross-site ajax policies in firefox?

I need a way to request any site using Ajax. I mean ANY site, I don't want to have to use the workarounds that firefox offers that only apply to someone who's making page requests from the same domain. Is there ANY way to let this happen? I want this to occur as a local file.
Downgrade your Firefox to under version 3
Try http://dirolf.com/2007/06/enabling-cross-domain-ajax-in-firefox.html
Firefox 3 note
Versions of Firefox prior to Firefox 3 allowed you to set the preference capability.policy..XMLHttpRequest.open to allAccess to give specific sites cross-site access. This is no longer supported.
BTW, you can also save your web application(.html) as .hta, HTA application is allow cross site scripting.

Browser for cross-site-script testing (for testing Mozilla Add-On)

I am working on a Firefox extension that will involve ajax calls to domains that would normally fail due to the same-origin policy set by Firefox (and most modern browsers).
I was wondering if there is a way to either turn off the same-origin restriction (in about:config, perhaps) or if there was a standard lite-browser that developers turn to for this.
I really would like to avoid using any blackhat tools, if possible. Not because I'm against them, I just don't want to add another learning curve to the process.
I can use curl in PHP to confirm that the requests work, but I want to get started on writing the js that the addon will actually use, so I need a client that will execute js.
I also tried spidermonkey, but since I'm doing the ajax with jquery, it threw a fit at all of the browser-based default variables.
So, short version: is there a reliable browser/client for cross site scripting that isn't primarily a hacker app? Or can I just turn off same-domain policy in Firefox?
Use GreaseMonkey with GM_xmlhttpRequest
Did you look into HTTP Access Control

open source/free web based proxy project

is there any open source or free "web based proxy" server project that I can look into? I looking for one that don't required configuring browser sock..etc and having web basad interface. Does squid able to do that?
I used to need that several yeas ago. I don't think any supports SSL:
PHProxy - Supports javascript and cookies, but not AJAX or Flash that loads external content (such as youtube)
PHP-Proxy - I don't remember much about this one, but I remember it not playing well with images.
glype - This is a new one for me, I've never tried it.

How do different browsers handle caching for static content without an Expires Header?

After running the YSlow plugin on a site, I saw that one of the recommendations was to add far future expires headers to the scripts, stylesheets, and images.
I asked a different question about how to set this up in IIS, but I am actually just curious about how each browser behaves.
I have read that IE will cache items per browsing session, so once you reopen the site after closing the browser, it will need to reload all of the content. I believe that Firefox will go ahead and set a expiration date on its own. I have also heard that IE does not cache at all when connecting over HTTPS. I am not sure if these are at all accurate, though, and was wondering if someone could clear up any misconceptions I may have. Thanks!
You are right about Firefox setting its own expiration date. See the second item in this blog post:
http://blog.httpwatch.com/2008/10/15/two-important-differences-between-firefox-and-ie-caching/
IE, like Firefox, can cache HTTPS based content. However, you need to set Cache-Control: public for persistent caching across browser sessions in Firefox. See Tip #3 in this blog post:
http://blog.httpwatch.com/2009/01/15/https-performance-tuning/

Resources