1

Total beginner, so forgive me if this is working 'as designed'...

When testing a little personal project i noticed than when reloading the page in Firefox (52) the pseudo classes 'reload' in the same state they were in. I.e. If the pseudo is on :after, when hitting the reload button the page refreshes with the element coming up in the :after state.

When i force reload, it loads up ok in the :before state.

Just in case it was an issue with my code i went into a bunch of css switch/toggle generator sites and i get the same behaviour. One particular one ( http://www.cssportal.com/css3-flip-switch/ ) when i set it to "on" and reload, it comes up in the default "off" position, but after a second it sets itself back to "on".

Is that how it's meant to work in FF? Or is it a bug of sorts? It looks like FF saves the state and reloads it as such?

Any tips on how i could get it to always reload in the :before state? I had a good search around for the last hour or so and couldn't find anything relating to it.

Thanks

EDIT: That page i linked. Just realized using Chrome that what i described is how the page is, but on FF if i set it to "off" it reloads as "off" and stays like that, unlike in Chrome.

SECOND EDIT: From that other question pointed out to me, adding autocomplete="off" to the element clears the state and so it reloads in the :before state.

Thanks guys, you are awesome

O Lopez
  • 33
  • 4
  • Nice one. Thanks – O Lopez Mar 20 '17 at 21:04
  • While *technically* not finding a duplicate before posting a question is regarded as a bad thing, it sometimes is a sign that the initial question is not indexed well enough. While your question will be marked as duplicate, I assure you it's quite useful in the greater scheme (it will help other people with the same question find the answer faster), by better indexing the initial one. Congrats on your first (quite decent and pertinent) question. Welcome to [so]. – tao Mar 20 '17 at 21:11

0 Answers0