I'm new to ColdFusion, have a very basic problem that's really slowing me down.
I'm making edits in a text editor and refreshing the page in web browsers for testing. Standard web dev stuff, no browser-sniffing, redirection, or other weirdness, and no proxies involved.
When I refresh the page in Chrome or Firefox, everything works fine, but when I refresh in IE7, I get a blank page. View Source shows me:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8"></HEAD>
<BODY></BODY></HTML>
That's it. While I am rendering to the transitional DTD, the real head contains a title, etc.
My development server is CF 9, production is 8. This problem has been happening in both. Seems it may only be happening on pages that are the the result of a POST action.
I've never experienced this in ASP.NET (my usual development environment) using the same browsers.
If I remember correctly, IE does not re-post forms on refresh by default. It's been a few years since I used it for more than testing. However, I also recall it giving a message like "this page has expired" or something similar, so this may not be the issue you are experiencing.
I assume you're using IIS - If so, just to make sure that you get a fresh version of the page every time, set the content expiration (under HTTP headers in the site configuration) to "immediately"
Also, clear your IE cache and cookies... And, in CF admin, un-tick the "Enable HTTP status codes" option in the main setting page.
Related
There seems to be something odd in OG metadata in our website and I can't figure out what it is...
For example this page: https://en.ilmatieteenlaitos.fi/wind-energy.
Has og:image and og:title (there is some extra stuff, but they shouldn't matter)
<meta data-n-head="ssr" data-hid="og:image" property="og:image" content="https://images.ctfassets.net/hli0qi7fbbos/7aa7VLl18PM8amWiILgeCH/30be16653881211492963375de425d7b/Tuulivoimalat_Hamina_ilta_SariHartonen.jpg"> <meta data-n-head="ssr" data-hid="og:title" property="og:title" content="Wind energy - Finnish Meteorological Institute">
Previews show correctly in here: https://www.opengraph.xyz/url/https%3A%2F%2Fen.ilmatieteenlaitos.fi%2Fwind-energy/
Post Inspector shows preview incorrectly just like sharing the page in Linkedin app: https://www.linkedin.com/post-inspector/inspect/https:%2F%2Fen.ilmatieteenlaitos.fi%2Fwind-energy. Using inspector should refresh the cache, but it's not doing it.
I tested with a test page (https://cdn.fmi.fi/demos/stackoverflow/some) in different domain with same header and all worked just fine with inspector and app and everything.
Is the problem deeper in en.ilmatieteenlaitos.fi -settings since all worked fine in cdn.fmi.fi?
edit: did more testing on our beta-site so content of the page is same as in production. All worked just fine in beta-site. So my guess there is something wrong in production website's settings which is out of my comprehension. Any tips? :) We are using Contentful and AWS...
Try out this meta tags debugger tool here: https://thumbsmith.com/validator
My guess would be that maybe you need to add width / height tags for LinkedIn to pick it up
I believe the problem is oq:url. Currently it's always set to our website's mainpage. Maybe Linkedin caches stuff based on that so all shares get the same cached result. This is not the case for twitter. Not sure about other some-platforms.
I also added prefix="og: https://ogp.me/ns# to html-element's attributes. Not sure how much difference this makes.
Now Linkedin shares seem to work in our preproduction site which uses same data as production.
The recent Windows 10 update for KB5003637 seems to have caused our use of the WebBrowser control to fail. Our applications use a C++ dialog that hosts a web browser control based on the IWebBrowser2 interface and implemented by the COM class 8856f961-340a-11d0-a96b-00c04fd705a2. The control interacts with a bespoke internal 'web server' that is hosted on a localhost port. The web browser is rendering dynamic HTML with a bunch of css and javascript. It's a legacy app that has been working reliably for many years.
Our users that have Windows 10 versions 2004, 20H2, and 21H1 are installing the KB5003637, and when they do the web browser does not render the content that it did before.
Looking at some trace, I can see that the Web Browser is requesting the page's HTML, which seems to be delivered as it should. What normally happens at that time is that the web browser control requests the css and javascript files needed to make the page active. What happens instead is nothing.
The KB5003637 update is pretty big, but does contain fixes for some scripting vulnerabilities described in CVE-2021-31959 which are very much on point. Nothing that I've found so far indicates how this was fixed, the effect that it has on the WebBrowser control, nor what workarounds there might be.
Any help would be appreciated.
Turns out that the Windows update I described did change the behavior of the WebBrowser control. Our bespoke web server was not including content type headers for responses to the WebBrowser's request. For the last decade or more, the control was successfully able to figure out what the content was OR it defaulted to the correct content type in the cases that mattered. After the update, the WebBrowser was defaulting to a content type of 'text' for the initial HTML payload. As a result it was not trying to interpret the payload as HTML and therefore no further actions were necessary (like requesting css and js files).
When I changed the code to include a content type header of "text/html" for the initial payload, the application began working. Content type headers are now included with all replies.
I was studying mozilla django tutorial and in between that I came across one point where I have to redirect the url ' ' to '/catalog/' with permanent = True.
Now I have one new project (another project in different directory ) with django-admin and gave the command of manage.py runserver (notice I haven't made any changes in this project) the url '' is automatically being redirect to '/catalog/' in chrome it works fine in opera mini though.
It’s probably not a Django issue, but due to Chrome caching certain requests. You could try a hard refresh of the page:
https://www.getfilecloud.com/blog/2015/03/tech-tip-how-to-do-hard-refresh-in-browsers/
Unless the redirect is being handled by some unusual Javascript (and you are doing this in Django so probably not), you probably just need to refresh the page. Hold the shift key while clicking on the refresh button in Chrome.
This is because chrome has cached this particular redirect and uses it without checking with the server. You can get rid of this by clearing your browser cache - but you might not want to do this because you'll lose other data too. Instead, right click on the page in question and go to developer tools (or hit F12). Go to the Network tab and tick "Disable cache". Now refresh the page without the redirected part of the url, and the page should load correctly. Now close developer tools and it should continue to work as intended.
I solved it by deleting the browser history(going to Advanced mode and selecting everything).
It is necessary to make a static application that uses a constant connection to the server to receive messages or updates the page in a period of time. With Django, python 2.7 and without js and jquery.
Just immediately do a page refresh by adding <meta http-equiv="refresh" content="0"> to the of your page. Then sleep instead of responding until you actually want to update the page.
Thats still a shitty hack and you should propably reconsider your design. Client-Side Updates and no JS doesn't mix.
Esteemed Django experts and users:
I have been using Django's admin interface for some data editing needs. I am using it on Windows Server 2008, and using django-mssql to connect to a SQL Server backend. Python 2.6.2 Django 1.1.0 final 0
As per usual w/ Django, this was fairly easy to set up, and works beautifully on Firefox, but using IE8 I intermittently get a puzzling 'Internet Explorer cannot display this webpage' when I save a record.
In the log, looks like typically on a save there's a POST request that returns a 302 status followed by a GET returning a lovely 200. This is on Firefox. On IE8 looks like sometimes POST works but GET doesn't.
So that's what I have going on. Any help w/ this will be appreciated. Thank you.
I suspect the bug is within IE8's refusal to process the redirect properly.
The 302 POST pushes to browser to the 200 GET, but if the browser never processes the 302 then the Django (or the server) will not log a 200 GET because the browser never opened the page (the server can only log what is accessed, ergo the browser is not making the call).
If you have Django behind something (IIS using FastCGI, or Apache, or something), bump up the logs to make sure there's no silent error in rendering. I had the same problem on Vista x64 Ultimate IE8 Beta 2, but compatibility mode appeared to fix the problem somewhat -- there was still some intermittently occurring refusal to redirect.
I realize this post is a bit old now, but I had the exact same symptoms recently. After a lot of digging around, I found that IE8 has issues accepting cookies with a life of less than 20 minutes.
In our Django project's settings.py we had the property SESSION_COOKIE_AGE set to 10 minutes. Once I bumped it to 20 minutes, IE8 had no problems logging in.