sIFR not working with disabled Cookies - sifr

sIFR is working fine across browsers UNLESS cookies are disabled. When cookies are disabed, the site appears to begin to load on refresh, but then quickly turns blank to a white screen without any content and no markup in the page source. I've tried using prefetch to resolve with no success. Has anyone else experienced a similar problem?

I received an email the other day asking a rather similar question, in which sIFR.activate() was invoked from inside $(document).ready(), which would break if cookies were disabled. For various reasons sIFR.activate() must be called directly.
I'm not sure if this is applicable to the situation as described in the question, but the coincidence is interesting.

Related

.liquid shopify theme causing iOS mobile flickering and page reset

My clients theme is 100% custom created before it was handed to me. The theme when loaded on an iOS device is flickering when scrolling and then the page resets. This is happening all through out the website, but again is only happening on iOS devices.
I am wondering if someone could help direct me to where i can begin to search and i do apologize with how vague this is, but i am really just looking for advice on where i can begin to look in the .liquid code to try to fix this. Or is this a JavaScript issue?
Thank you for whatever help you can send my way.
SOLVED:
The issue was with google tag manager script. The previous developer embeded the script snippet incorrectly which had an impact only on the iOS mobile for the site. Very weird and very unusual.
Advice:
Be sure to check any 3rd party snippets and embeds that are on a site to make sure they aren't impacting in a negative way.

Is it possible that iOS Safari keeps a page opened while reloading that very same page?

I have a Node.Js app that uses Socket.IO for a chat-like feature.
It works fine on desktop, but what happens sometimes on an iPhone is that when a user loads the page, they'll load it again and the system thinks that there's two people viewing this page already.
I've experienced this kind of caching error before with other stuff in my app (like it would take a few reloads for the page to fetch the new data – something that never happens to desktop and something that has to do with caching also I think).
Did anybody encounter a similar problem and know a solution?
Maybe there's some kind of directive I can give in the meta tags of my app to tell IOS browsers treat it differently?
Thanks!

Displayed in Browser different when logged in. Rails

I'm new to rails:
I've created a Reddit-lite like site. After I uploaded it to heroku I noticed that when I was signed in to an account I created on the site, the page was displayed in the browser as I intended it to be displayed, but when I logged out, or even before I logged in, the partial was displayed much larger than I intended it to be.
I've tried putting in search terms to here and haven't found anything close to the issue I am having, so I assume I am not describing it incorrectly. Here is a link to my site, so where ever I am lacking in describing my issue might be overcome by your experiencing it.
http://postit-reed.herokuapp.com/
The h3 tag around your welcome message isn't closed properly when logged out. Causing the browser to wrap the rest of your html in the h3 which applies a bigger font size to everything making it look bigger. Fix the h3 tag.

Rails Caching a Page Improperly - How to Stop?

I have a very simple test case that explains the problem.
Here's the page that I'm displaying in Rails in an ERB file.
<div><%=rand%></div>
<p>Go</p>
To show the error, I load the page. I note the random number displayed as rand1. I click on the Google link. I click the browser's "Back" button. I note the random number displayed as rand2.
Here's the problem:
In Firefox and Chrome, rand1 != rand2 (always).
In Safari and IE, rand1 == rand2 (always).
Why the discrepancy in browsers? Why is Safari and IE caching the output from Rails while the other two browsers are not? How do I get Safari and IE to refresh the page?
(This is a simple test case to show the problem - this has implications in my Backbone application).
IE and Safari appear to be caching the response from the server, obviously; as long as your browsers are configured correctly, you can change this by changing the Cache-Control header in the response.
Another Stack Overflow post shows the appropriate way to do that, though in Rails 3 there's a shortcut method to accomplish this: you can invoke expires_now in the controller action to avoid manually setting all these headers.
WebKit in particular has an aggressive page caching strategy for handling exactly the case you're describing (clicking a link and then immediately clicking the back button). The idea is to make the back action happen almost instantaneously by caching not just the resources but also the DOM and other state of the page. You can read about it in these two articles:
WebKit Page Cache I — The Basics
WebKit Page Cache II — The unload Event
You may be able to use a combination of the load/unload and pageshow/pagehide events to accomplish what you need.
I'm not sure if IE implements something similar to WebKit, but maybe this will fix it too.

Ruby on Rails Mysterious Javascript Alert box with cookie information

I have a problem in a Ruby on Rails app that I am working on. I have been working on the app for months and I have never had this problem before and after a bit of Google searches I think that somehow someone is trying to steal cookies with javascript.
When I click on the link I get an alert box titled "the page at www.napkinboard.com says:" and contains the following message:
__utmz=217223433.1270652009.59.3.utmcsr=localhost:3000|utmccn=(referral)|utmcmd=referral|utmcct=/; __utma=217223433.2133018314.1265749085.1271097412.1271125626.63; __utmc=217223433; __utmb=217223433.11.10.1271125626
I checked the database and all data associated with this 'food_item' looks completely normal and does not contain any javascript at all.
How did this suddenly happen and how can I stop it? I appreciate any help. Thanks.
EDIT: Can't believe I forgot the URL: http://www.napkinboard.com/food_items/413
It sounds like you've found a link that exploits an XSS vulnerability using the query string.
Make sure to properly escape all of your output.
load up firefox and firebug, and see what the javascript and network stack trace show. That should give you an idea of where it's coming from, etc.

Resources