Changes in stylesheet not being reflected

  • Advertisement ( why? )
     

    digitl, 24th Jun 2014 6:32 am

    When editing a page and its stylesheet, changes in the stylesheet are not being reflected in the page when 'Preview' is clicked. If I check the altered page in my browser I can see the changes.

    • HTML-Kit Support, 24th Jun 2014 7:23 am

      On 6/24/2014 6:32 AM, digitl wrote:

      When editing a page and its stylesheet, changes in the stylesheet are
      not being reflected in the page when 'Preview' is clicked. If I check
      the altered page in my browser I can see the changes.

      Hi,

      This is probably related to browser caching. I'd try enabling "Edit >
      Preferences > Advanced > Send nocache parameter while previewing" and
      reopening the document.

      Let me know if this doesn't help.

      Chami

      • digitl, 24th Jun 2014 7:39 am

        Sadly, the change you suggested didn't alter the behaviour.

        I also tried setting 'Use data cache' to 'No' but that didn't work either.

        • HTML-Kit Support, 24th Jun 2014 8:12 am

          On 6/24/2014 7:39 AM, digitl wrote:

          Sadly, the change you suggested didn't alter the behaviour.

          I also tried setting 'Use data cache' to 'No' but that didn't work either.

          Question time!

          Are you using F12 to preview? Does going to the F12 preview a second
          time help?

          Is Ctrl+F12 preview doing the same?

          How about "Extended Preview" (monitor icon on the top right menu bar)?

          What exact tag are you using to refer to CSS?

           <link rel="stylesheet" type="text/css" href="style.css" />
          

          Does adding ?v=123 (123 incrementing with change) refresh the preview?

           <link rel="stylesheet" type="text/css" href="style.css?v=123" />
          

          I should probably stop there :)

          Chami

          • digitl, 24th Jun 2014 2:36 pm

            I'm using <link rel="stylesheet" type="text/css" href="style.css" /> but using <link rel="stylesheet" type="text/css" href="style.css?v=123" /> and following your suggestion solves the problem. Except I have to increment the ?v=123 for each and every preview of course...

            • digitl, 24th Jun 2014 2:48 pm

              Sorry, forgot to say that I usually click on Preview at the bottom left of the HTML-Tools window. Pressing F12 and CTRL-F12 don't work either. Neither does pressing F12 twice.

              Extended preview does, however, and both the HTML-Tools preview, and the preview in the browser, update correctly when F12 is pressed.

              • HTML-Kit Support, 26th Jun 2014 12:51 pm

                On 6/24/2014 2:48 PM, digitl wrote:

                Sorry, forgot to say that I usually click on Preview at the bottom
                left of the HTML-Tools window. Pressing F12 and CTRL-F12 don't work
                either. Neither does pressing F12 twice.

                Extended preview does, however, and both the HTML-Tools preview, and
                the preview in the browser, update correctly when F12 is pressed.

                Thank you for checking out the different options and letting me know how
                they went. It's interesting that caching isn't an issue when you use
                Extended preview in either external or internal preview. This helps with
                further testing.

                Chami