2

I have a website which in a DEV context has the URL localhost:8080/MySite and on test/live it will just be www.test.mysite.com and www.mysite.com

In my manifest i have

FALLBACK:
/ offline.html

the problem is if the user hits localhost:8080/MySite (not no slash on end) and the fallback kicks in they get redirected to localhost:8080MySite which bugs...

Does anyone know around this issue, I tried / /offline.html but that bugged the manifest

Timothy Jones
  • 21,495
  • 6
  • 60
  • 90
williamsandonz
  • 15,864
  • 23
  • 100
  • 186
  • It works fine when any page on the website is accessed or if "/MySite/" is used. It's just when you try access the root page without a slash at the end. Can anyone think how I can get around this? I'm serving the website in JSP and it has the context "MySite" – williamsandonz Jan 31 '12 at 01:25

1 Answers1

3

I tried to replicate your case as much as I could. It worked fine for me using the following:

  • I have a directory structure like this one:

    /MySite/HTML/

    /MySite/Styles/

    /MySite/Images/

    /MySite/Scripts/

All my HTML files are located under /MySite/HTML/, including "offline.htm"

  • My manifest file is as follows:

    CACHE MANIFEST

    CACHE: main.htm

    /MySite/Styles/mustyles.css

    /MySite/Images/random.jpg

    /MySite/Scripts/jquery.js

    NETWORK:

    *

    FALLBACK:

    / /MySite/HTML/offline.htm

If I type the Following URLs, I always get the "offline.htm" page:

  • localhost/MySite/
  • localhost/MySite
  • localhost/MySite/HTML/
  • localhost/MySite/HTML

Note the fallback URL. Tested on FF and Chrome.

Hope this helps.

Gabe Thorns
  • 1,426
  • 16
  • 20