11 Replies Latest reply on May 2, 2011 7:35 PM by c627627

    Force a modification check so that new/edited content is displayed w/o having to F5 Refresh

    c627627 Level 1

      When changes are made to a web site they sometimes don't show up unless you press F5 to Refresh the page. How can I make sure that if the web site is being visited by  someone who visited before, it doesn't just show up the old content.

       

      This appeared to work for internet Explorer but inserting

      <META HTTP-EQUIV="EXPIRES"
      CONTENT="0">
      into index.htm file using Dreamweaver still does not perform a  modification check and Firefox still displays previously loaded page without  modified content until you hit F5 Refresh.

      I'd like Firefox to do a modification check every time the page is visited and display newly added/edited content.

        • 1. Re: Force a modification check so that new/edited content is displayed w/o having to F5 Refresh
          Nancy OShea Adobe Community Professional & MVP

          Add a Last-Modified Meta Tag to your document with date and time (GMT).

           

          <meta http-equiv="Last-Modified" content="02 May, 2011  at 07:54:24" />

           

           

          Nancy O.
          Alt-Web Design & Publishing
          Web | Graphics | Print | Media  Specialists 
          http://alt-web.com/
          http://twitter.com/altweb

          • 2. Re: Force a modification check so that new/edited content is displayed w/o having to F5 Refresh
            c627627 Level 1

            Here are the first 13 lines of the index.htm web page file. As you can see I inserted your suggestion directly under <head> below.

            Still, when I go to test it - it still does not display the edited content unless I press on F5 to Refresh...

             

             

             

            <html xmlns:v="urn:schemas-microsoft-com:vml"
            xmlns:o="urn:schemas-microsoft-com:office:office"
            xmlns:w="urn:schemas-microsoft-com:office:word"
            xmlns="http://www.w3.org/TR/REC-html40">

             

            <head>
            <meta http-equiv="Last-Modified" content="02 May, 2011  at 07:54:24" />
            <meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
            <meta name=ProgId content=Word.Document>
            <meta name=Generator content="Microsoft Word 11">
            <meta name=Originator content="Microsoft Word 11">
            <link rel=File-List href="index_files/filelist.xml">
            <link rel=Edit-Time-Data href="index_files/editdata.mso">

            • 3. Re: Force a modification check so that new/edited content is displayed w/o having to F5 Refresh
              Nancy OShea Adobe Community Professional & MVP

              In theory, if the browser's cached version is older than the one on your server, the newer page will display.

              Clear your browser's Cache & History folder.

               

              Incidentally, MS Office code doesn't play nice with HTML.  I don't recommend using MS Word to generate HTML pages.  If you're compelled to copy & paste from MS Office, use DW's Edit > Paste Special > Text only option.  This strips out the MS formatting and other junk code before it ever reaches your HTML page.

               

              Also, run your code through the W3C Validation tool and fix your code errors.  It looks like you don't have a valid document type declaration on your page(s).

              http://validator.w3.org/

               

               

               

              Nancy O.
              Alt-Web Design & Publishing
              Web | Graphics | Print | Media  Specialists 
              http://alt-web.com/
              http://twitter.com/altweb

              • 4. Re: Force a modification check so that new/edited content is displayed w/o having to F5 Refresh
                c627627 Level 1

                Thank you for your advice.

                 

                1. Yes clearing the browser or simply pressing F5 displays everything, however the thread question is: how can added/edited content be displayed to users who have already visited the page? They don't know that the page has been edited, they are not going to be refreshing the page - simply browsing back to it or pulling the page up again from their Favorites/Bookmarks.

                 

                I was under the impression that there was a command that would make the browser check cached content so that it would have to display new/edited parts of the page.

                 

                If they never cleared their browser settings or pressed F5 to refresh the page - when would they ever see new content?

                 


                2. Microsoft code is in there possibly because the file may have been opened at one time or another with Microsoft software. I use Dreamweaver 2004. Your advice is good and I would like to strip out any Microsoft formatting present. However when I open the page with Dreamweaver CS4, then copy or cut the code, only Paste is available. Paste Special... is grayed out. Opening a new instance of Dreamweaver CS4 also only has Paste but not Paste Special.. available. Why would that be and I would appreciate any further advice on clearing away Microsoft code.

                 

                3. What is a W3C Validation tool, the page seems to be OK, how do I tell that it is not valid/what kind of problems it has?


                4. Off topic: Incidentally, I still use Dreamweaver 2004 because when I tested the versions that came after it, versions 8, 9 and 10 all hang before resuming if internet connection is blocked when editing certain htm files. Version 7 (Dreamweaver MX 2004) is the last version that is not affected by this internet connection hang I found and so I continued to use it since I only do very basic page editing and found no reason to upgrade. I usually have internet connection open - not blocked but that still was a bug in later versions which was is not presnet in version 7 I thought...

                • 5. Re: Force a modification check so that new/edited content is displayed w/o having to F5 Refresh
                  Nancy OShea Adobe Community Professional & MVP

                  #1  To turn off caching on select web pages, use the no-cache  &  pragma no-cache meta tags.

                   

                       <meta http-equiv="cache-control" content="no-cache">
                       <meta http-equiv="pragma" content="no-cache">

                   

                  #2  Paste Special is a Design View feature.

                   

                  #3  W3C Vadliation tools check the code on your URL and tell you if you have any invalid markup on your page.  Similarly, there is one for checking CSS code.

                   

                       Code Validation Tools
                       ------------------------------------
                       CSS - http://jigsaw.w3.org/css-validator/
                       HTML - http://validator.w3.org/

                   


                  #4  CS4 generates better code than MX 2004 and has many more features.  And while I don't have trouble with DW's FTP, I often use FileZilla  -- a dedicated FTP app.  It's faster and has more options.

                   

                   

                   

                   

                  Nancy O.
                  Alt-Web Design & Publishing
                  Web | Graphics | Print | Media  Specialists 
                  http://alt-web.com/
                  http://twitter.com/altweb

                  • 6. Re: Force a modification check so that new/edited content is displayed w/o having to F5 Refresh
                    c627627 Level 1

                    I will look into the rest of your suggestions next but just a quick note that per your suggestion, I inserted the following
                    <meta http-equiv="Last-Modified" content="02 May, 2011  at 07:54:24" />
                    <meta http-equiv="cache-control" content="no-cache">
                    <meta http-equiv="pragma" content="no-cache">

                     


                    Testing shows that after visiting the page, making a change above then visiting the page again: the updated and newly added content is not displayed until you F5 Refresh the page. So I am still having trouble forcing Firefox to display updated content w/o Refreshing the page.

                    • 7. Re: Force a modification check so that new/edited content is displayed w/o having to F5 Refresh
                      Nancy OShea Adobe Community Professional & MVP

                      Are you closing Firefox each time??

                       

                      Does this happen in other browsers?

                       

                      It's entirely possible your host or your ISP is caching pages at their end to make connection speeds seem faster.

                       

                      I don't know what else to tell you.

                       

                       

                      Nancy O.
                      Alt-Web Design & Publishing
                      Web | Graphics | Print | Media  Specialists 
                      http://alt-web.com/
                      http://twitter.com/altweb

                      • 8. Re: Force a modification check so that new/edited content is displayed w/o having to F5 Refresh
                        c627627 Level 1

                        Thanks for trying, I would like to keep this question open with hopes that someone would come across it in the future. Here are the facts:

                         

                        Once again the goal:

                         

                        1. You open web page

                        2. I edit index.htm

                        3, You open same web page again and see edits without Reloading the page.

                         

                         

                        1. This happens just fine in Internet Explorer, so I assume that means the ISP is not  caching pages at their end to make connection speeds seem faster.

                        2. I opened index.htm in Dreamweaver CS4 > switched to Design TAB > Edit > Select All > Edit > Copy

                         

                        then

                         

                        File > New > HTML > Create >

                        then

                         

                        Edit > Paste Special... > SELECT: Text with structure plus full formatting (bold, italic, styles) > OK > CHECK: Assume <empty> for blank entries > OK

                         

                         

                        Now doing that and saving the file as index.htm just got rid of any Microsoft formatting I assume?

                         

                         

                        3. Still latest Firefox 4.0.1 continues to display the page as it did when it originally opened it instead of including the edits.

                         

                         

                        Here are the first 12 lines of code now:

                         

                        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                        <html xmlns="http://www.w3.org/1999/xhtml">
                        <head>
                        <meta http-equiv="Last-Modified" content="02 May, 2011  at 07:54:24" />
                        <meta http-equiv="cache-control" content="no-cache">
                        <meta http-equiv="pragma" content="no-cache">
                        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                        <title>Untitled Document</title>
                        <meta http-equiv="Expires"
                        content="0" />
                        <style type="text/css">
                        <!--

                        • 9. Re: Force a modification check so that new/edited content is displayed w/o having to F5 Refresh
                          Nancy OShea Adobe Community Professional & MVP

                          #2 Don't assume anything.  Check your source code.

                          Open page in browser.  View source.  Do you see any MS junk code?  If not, you're golden. :-))

                           

                          #3   Firerfox 4 is notably faster than its FF3 predecessor but it has several BUGS that need to be worked out.

                          FYI  Plug-ins (Acrobat, WMV, etc....) and certain Add-Ons are posing big problems for many. Cache sticking could be another un-reported issue.  Test your site in Safari/Chrome & Opera.  If it works in those browsers without hitting REFRESH, you're probably doing all you can do.

                           

                           

                           

                          Nancy O.
                          Alt-Web Design & Publishing
                          Web | Graphics | Print | Media  Specialists 
                          http://alt-web.com/
                          http://twitter.com/altweb

                          • 10. Re: Force a modification check so that new/edited content is displayed w/o having to F5 Refresh
                            c627627 Level 1

                            I have installed Google Chrome and confirmed that just like Internet Explorer - it also displays the edited page correctly w/o the need to Reload the page. Therefore just as you suspected - Firefox is the culprit. Sure enough I tried it w/o Add-ons and it still did it - making a case that this may be some sort of a cache sticking bug. I will open a case with Mozilla about this.

                             

                            Other than this - for a bug to be a Firefox bug - it would have to be reproducable when Firefox > Help > Restart with Add-ons Disabled... is executed. Or when  you run firefox.exe -profilemanager and select a brand new unmodified profile without any add-ons or modifications. So add-ons and moficiations may have bugs but are you sure Firefox itself has other performance bugs?

                             

                            Either way, I will report back when/if I get the results of my bug report with Mozilla.