Firefox defaulting to several Mobile Websites - firefox

My problem involved specifically firefox defaulting to mobile sites (but only certain mobile sites). Here is the fix that worked for me.

go into the: "about:config" area of Firefox (type into browser url, ok through warning).
Checked a couple hundred lines.. changed some to default values then I saw one stand out.
network.http.accept.default = "text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8,text/vnd.wap.wml;q=0.6"
The second I saw that wap.wml I knew we had a problem.. turns out via the firefox knowledge base that the q value sets the preference (0.0 lowest, 1.0 highest). When I clicked the reset button the value shot back to:
network.http.accept.default = "text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
I didn't look at the source code of the pages that I had problems with.. but 2 of them were: www.cnn.com and www.paypal.com (both of which shot me to m. version of the page).
after just recently working w/ some htaccess files. I realized that the coding in the htaccess (or in the site's javascript, depending on how you do it) will detect what type of device your own. Some will work w/ your browsers/device. some will look for what your capabilities are. The problem I had as specified above is that my firefox said I was wap capable... some htaccess files say: if wap capable then go to mobile site. Others will say if browser/device = "" then go to mobile site. So really it's how the company codes their backend.. The problem being is that the htaccess isn't taking into consideration the weights of what type you prefer to accept.
anyways fixed and shared..

Related

What are some websites to circumvent company firewall and view blocked sites? (not proxy)

I've been using these for some time. Each has its own limitations.
textise.net - It retrieves text content of the blocked site. I miss visual content, especially when there is text on images. I also miss empty placeholders for images and videos. Clickable tabs or "more" buttons hiding text are also unavailable.
web2pdfconvert - Hit or miss. Sometimes it doesn't work (from behind firewall). I don't know why.
icanprove.de - Opens a browser inside a browser. A great idea. I even donated. I wonder why there's no alternative (or is there?). The drawback is, some sites (esp. shopping) reject access from this site.
Are there any other sites like these? I'm a restricted user, so no browser extensions, no software install, no changing internet settings for me. All proxy sites are blocked as you might guess. I'm not a computer guy but copying and mimicking the contents of a site should not be so difficult, I presume.
Thanks.
Search for "free vpn" and look for something that works best in your country or with the speed or other constraints that you have now.

why hosting images in google sites from google drive has stopped working?

yesterday I created a simple "quote of the day" script for my google site. The script reads the quote from a google sheet. I also wanted each quote to go
with a companion image, which I host in my google drive (the image Ids also are stored in the sheet).
I followed the instructions explained here, and everything seemed to work fine. The permissions for the images was "everyone with the link within my institution" (this is supposed to work in a website on the google apps for education).
It was a success, because the images did display correctly.
Today I opened that page again, and the images have disappeared.
I know that image hosting was discontinued in 2016, but I think it was a different way of hosting (no permalink). Indeed, as I mention, yesterday I could see the images in the website.
Also, when I write the "permalink" in chrome address bar I get "403. That’s an error. We're sorry, but you do not have access to this page. That’s all we know." This happens despite I'm the owner of the file, and I'm logged in the correct google account. Also, it happens irrespective of the browser and/or machine I use (I tried with my phone too).
I also tried what explained here, although I'm not sure I understand that completely. There should be a problem though, because instead of the image I get the alt text (NA).
Is the "permalink" method still supposed to work?
Could this be a problem of excessive traffic? I haven't even published the page yet, I only did some testing...
What is the best way of displaying images from google drive into google sites, without resorting to third party services?
Thanks a lot
Francesco
You already answered your question. Hosting on Google Drive has been stopped.
However, you can try the workaround from this SO post where you'll use the URL:
https://drive.google.com/uc?export=view&id={IMAGE_FILE_ID}
It worked fine when use with the <img src="{IMAGE_URL}"> HTML tag. That's the closest thing to what you're trying to do.
You can also try Firebase Storage where you host your images on the cloud and display them on your web page.
This is at least a partial answer to the problem I tried to explain, which I'm summarizing below:
I was hosting images for a page in my google site on my google drive, via the syntax
https://drive.google.com/uc?export=view&id={IMAGE_FILE_ID}
the sharing settings of the individual images was "anyone with the link within [my institution]";
this worked for one single day and then stopped working: the images stopped showing, and I could not figure out why. All this happenened a few days ago (oct 21-22 2017), and hence cannot possibly have to do with google discontinuing a previous service, which happened in 2016;
this happened despite I was logged into the account in my institution (and hence the owner of the images).
I found out that the problem appears to be in the sharing settings. Apparently, the images only display if their sharing settings are "public on the web" or "anyone with the link". Instead "anyone with the link within [my institution]", or more restrictive settings won't work. The first settings were mentioned in the webpage I linked, but I thought it would also work with "anyone with the link within [my institution]" (and, for one day, it did).
I also tried by setting the permissions of the parent folder. In that case only "public on the web" would work. With anything more restrictive than that the images won't display.
Despite I carefully double checked all this, I think this permissions thing seems to be a bit erratic though.
As I mention, on the first day (oct 21) the images would display even with "anyone with the link within [my institution]. I could swear on my life that, before the systematic tests I just finished carrying out, all was working with the folder settings to "anyone with the link [within my institution]". Now that setting won't work.
I know, I said "it appears" a bunch of times. This is because all of this is just from my point of view, so far. I still have to share the link of the page I'm preparing. As soon as I can I'm going to ask a colleague to take a look at it.
What I anyway want is that the page displaying the images is visibile only to people within my institution, for the moment being.
However, now I'm at least able to see the images hosted in drive, in my website.

How do I show an error page when users visit my site using Microsoft Edge?

When a user loads my website in Microsoft Edge, I need to show a page like in the below image:
I can see like this page when I'm trying to access sites like www.naver.com or www.daum.net on Edge.
That page looks like a Provided from Microsoft , and I guess there are
Any Javascript function to call this pages
I need to know how ..
If possible you should avoid browser detection and move to modern web technologies that work across browsers. A great tool you can use is the sitescan on http://dev.modern.ie/tools/staticscan/ that helps to identify common issues, like outdated js libraries or css prefixes.
If your app requires legacy technology like activeX or other IE specifics you can:
have your site added to to compatiblity list managed by Microsoft
(for public sites)
or create an enterprise site list for your company / intranet
pages which determines which pages to open in IE instead of Edge.
Charles provided some details here: https://stackoverflow.com/a/31283160/5138360
In my opinion you're going about this the wrong way, I know supporting new browsers may be frustrating, but you're only delaying work that needs to be done (in this case, supporting Edge when Internet Explorer's usage will be at a decline in the next few years).
However, what you're asking can be done with PHP's get_browser() function; you should check if the user-agent string has 537.36 Edge present, and if so show the error message; if not show the normal content:
<?php
if (strpos(get_browser(),'537.36 Edge') !== false) {
echo "Edge Browser Detected";
}
else
{
echo "You are not running Edge.";
}
?>
Where echo "Edge Browser Detected";, replace with your error page, where echo "You are not running Edge.";, replace with your normal page content.
If you receive this error, refer to this question on how to fix:
WARNING get_browser() [function.get-browser]: browscap ini directive not set on line number 2
As mentioned in this thread: http://answers.microsoft.com/en-us/insider/forum/insider_internet-insider_spartan/ms-edge-show-alert-titled-this-website-needs/7771eb86-7b4d-440c-bc4d-43a88d1e489d
You may run a scan of your site here: http://dev.modern.ie/tools/staticscan/?url=http%3A%2F%2Fnaver.com
When you do so, there's an information message regarding the "Rendering Mode":
There is an issue with this website that could force an old rendering
mode.
We’ve found that this webpage was added to a Compatibility View list
when a user reported a compatibility issue while browsing in Microsoft
Edge. For this reason, your site will render in Internet Explorer 11
on Windows 10 as a fallback. We recommend that you use modern markup
for all modern browsers and include Microsoft Edge in your test
matrix.
So there you go, it seems that the website needs to be reported as incompatible for Edge to display this message. However, i'd be surprised if Microsoft added all reported sites to their compatibility list (I bet the site has to be of some significance and several users need to report the site).
Please see https://stackoverflow.com/a/31283160/1010492 on how to have your site added to the compatibility list.

cookies or cache? my own site won't load in FF without a restarting FF

Over the last few days, I've noticed that (occasionally) when testing my own site in FF, it loads the first time that FF has been opened, but it seems to hang on subsequent loads (windows only - i haven't noticed this behaviour on mac, but i don't use my mac as much).
The url is http://HearWhere.com
Of course, my concern is that sometimes people will try to get to the site and not be able to (and based on what I can see, that is a distinct possibility, as i've seen a significant drop in stats over the last few days, so I suspect that might be happening).
Any idea why? I can't seem to figure this one out.
I view source on the page that hasn't loaded, and it appears that all the source is there.
The one thing I can think of that might be causing the problem is that in my head and footer, i have a bit of PHP which attaches the correct API key based on the visiting domain (this is so I don't have to hard-code the api key into the page and change it from dev to prod).
i use a fairly simple
$domain=$_SERVER['SERVER_NAME'];
if($domain=='dev'){
$apiKey='apikey';
}else {
$apiKey='apikey2';
}
but when viewing the source, it appears that show without issue.
I do a similar bit of code at the bottom of the page so I only include tracking codes when the domain is not dev.
Any ideas?
UPDATE --------------------------------------------------------------------
After checking it out in Firebug (not sure why i didn't check that before), the following two google scripts are failing, and everything stops there.
The site is map/location centric, so there i need the google stuff. Any idea why it would fail?
these are the failing scripts
http://gg.google.com/csiv=2&s=mapsapi&action=jsloaderjslinker&rt=jsload.69,jseval.103,jsdone.105
http://gg.google.com/csi?v=2&s=mapsapi&action=apiboot&rt=d.2,e.316,ab1.336
Have you tried Firebug plugin for Firefox? It could help you debug some script/network/html issues.
You can monitor script, images and other ressources load time.
Good luck.
It appears this was/is an error with Firebug. Disabling firebug resolves the issue, so it shouldn't affect too many visitors.
Thanks for the help,
Pete

Firefox add-ons

What Firefox add-ons do you use that are useful for programmers?
I guess it's silly to mention Firebug -- doubt any of us could live without it. Other than that I use the following (only listing dev-related):
Console2: next-generation error console
DOM inspector: as the title might indicate, allows you to browse the DOM
Edit Cookies: change cookies on the fly
Execute JS: ad-hoc Javascript execution
IE Tab: render a page in IE
Inspect This: brings the selected object into the DOM inspector
JSView: display linked javascript and CSS
LORI (Life of Request Info): shows how long it takes to render a page
Measure IT: a popup ruler.
URL Params: shows GET and POST variables
Web Developer: a myriad of tools for the web developer
Here are mine (developer centric):
FireBug - a myriad of productivity enhancing tools, includes javascript debugger, DOM inspector, allows you to edit the CSS/HTML on the fly which is highly valuable for troubleshooing layout and display problems.
Web Developer - again another great developer productivity tool. I mostly use it for quickly validating pages, disabling javascript (yes I disable javascript sometimes, don't you?), viewing cookies, etc.
Tamper Data - lets you tamper with http headers, form values, cookies, etc. prior to posting back to a page, or getting a page. Incredibly valuable for poking and prodding your pages, and seeing how your web app responds when used with slightly malicious intent.
JavaScript Debugger - has a few more features than javascript debugger provided by firebug. Although I must admit, I sparingly use this one since firebug has largely won me over.
Live HTTP Headers - invaluable for troubleshooting, use it frequently. Lets you spy on all HTTP headers communicated back and forth between client and server. It has helped me track down nefarious problems, especially when debugging issues when deploying your web app between environments.
Header Spy - nice addon for the geeky types, shows you the web server and platform a web site runs on in the status bar.
MeasureIt - I don't use this all too frequently, but I've still found it valuable from time to time.
ColorZilla - again, not something I use all that frequently, but when I need it, I need it. Valuable when you want to know a color and you don't want to dig through a CSS file, or open up a graphics editing app to get a color embedded in some image.
Add N Edit Cookies - this has been a great debugging tool in web farms where the load balancer writes a cookie, and uses the cookie value to keep your session "sticky". It allowed me to switch at will between servers to track down problems on specific machine. Also a good tool if you want to try to mess with a site that uses cookies to track your login status/account, and you want to see how your code responds to malformed or hacked info.
Yellowpipe Lynx Viewer Tool - yeah I know what your thinking, lynx, who needs it, its so 1994. But if you are developing a site that needs to take web accessibility into account (meaning accessible to users with visual impairments who use screen readers), or if you need to get a sense of how a web spider/indexer "sees" your site, this tool is invaluable. Granted, you could always just go out and grab Lynx for yourselfhere's the windows xp port that I use.
I've got a handful of other addons that I've used from time to time that I'll just quickly mention: FireFTP (one I installed wasn't stable and I've not tried a newer release), Html Validator (also found this one unstable, least back when I installed like a year ago), IE Tab (I usually just have both IE and FireFox open concurrently, but that is just me, I know many others that find this addon useful).
I'd also recommend the Web Developer extension by Chris Pederick.
As far as web development, especially for javascript, I find Firebug to be invaluable. Web developer toolbar is also very useful.
The ones I have are...
Y-SLow
Live Headers
Firebug
Dom Inspector
One that wasn't mentioned yet is this HTML Validator extension that I found very useful.
#Flávio Amieiro
MeasureIt is an unnecessary extension to have if you install the Web Developer Toolbar. Web Developer Toolbar includes a ruler as one of its features. Under the "Miscellaneous" category for Web Developer click the option "Display Ruler" to use a ruler identical to the MeasureIt one.
That will allow you reduce the number of extensions needed by at least one.
Firefox addons:
FireBug:helps web developers and designers test and inspect front-end code. It provides us with many useful features such as a console panel for logging information, a DOM inspector, detailed information about page elements, and much, much more.
Web Developer-gives you the power disable CSS, edit CSS on the fly, measure certain areas of a page and much more.
ColorZilla
Just click on the icon, hover over the area you'd like to know the hex color for, and click.
Window Resizer
to make sure the layout is displayed properly in the standard resolutions of today.
Total Validator
validating websites much easier by checking HTML, links, CSS and doing a lot more.
Web Developer for web development. Scribefire if you're a blogger-progammer
For web developing I use the Web Developer Toolbar, CSS Viewer and MeasureIt.
But I'm really not one of those who has a thousand of extensions to do everything. I like to keep things simple.
EDIT: Thanks to Dan's answer I don't need MeasureIt anymore. Can't believe I've never seen that! I guess I'll just have to pay more atention to this WebDeveloper toolbar.
Adding to everyones lists, Tamper Data is quite useful, lets you intercept requests and change the data in them.
It can be used to bypass javascript validation and check whether the server side is doing its thing.
I use Web Developer, it's a real time saver.
+1 for LORI ("life-of-request-info"). It's a very convenient alternative for rough measurements of the load time of a particular web page -- the kind of thing that you might otherwise use an external stopwatch for.
New Tab Homepage. Combined with a "speed dial"-type homepage (a personal, fast-loading page of links that you use frequently), helps you get where you're going faster when you open a new browser tab.
LastTab. Changes the behavior of Ctrl+Tab to let you navigate back and forth between your most-recently-used tabs with repeated presses of Ctrl+Tab, the same way that Alt+Tab works in Windows. Also provides a nice view of all open tabs while Ctrl is still being held down for easy navigation. (The resultant behavior is very similar to the Ctrl+Tab behavior in recent releases of Visual Studio.)
FireFTP is good for grabbing/uploading any necessary files.
I find Hackbar to be quite useful. Very useful if you want to edit the querystring part of the url, to test for vulnerabilities, or just general other types of testing where you might end up with complicated query string values.
I was learning DOM inspector, but I've switched to Firebug.
Some of which has been missed above are here
Load Time Analyzer – View detailed graphs of the loading time of web pages in firefox. The graphs display events like page requests, image loading times etc.
Poster – A must have tool for web developers enabling them to interact with web services and other web resources.
Aardvark – A cool extension for web developers and designers, allows them to view CSS attributes, id, class by highlighting page element individually.
Fiddler is a really great debugging proxy. Think of it as a more powerful version of the "Net" panel in Firebug or the Live HTTP headers.
It used to be an IE-only extension, now it also has hooks into Firefox.
Groundspeed, is useful for testing server side code. It was created for input validation tests during pentest, but can be useful for any test that require manipulating input (similar to TamperData).
It lets you control the form elements in the page, you can change their type and other attributes (size, lenght, javascript event handlers, etc). So for example you can change a hidden field or a select to a textbox and then enter any value to test the server response and stuff like that.

Resources