0

I am debugging my simple Grails application, the CSS effects sometimes miss when I refresh the page. however, view source shows correct html, but browser just shows the plain page.

If I stop grails and re-run, the CSS comes back. I guess it's something related to cache, but I really cannot figure out what's wrong. below is the source

<!DOCTYPE html>
<html>
<head>
<title>Login</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
</head>

<body>
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="span12"></div>
            <div class="span12"></div>
            <div class="span12"></div>
            <div class="span12"></div>
            <div class="span12"></div>
        </div>


        <div class="row-fluid offset7">
            <div class="well span3">
                <form action="/dashboard/login/login" method="post" >
                    <fieldset>
                        <div class="control-group">
                            <!-- Username -->
                            <label class="control-label" for="account">Account</label>
                            <div class="controls">
                                <input type="text" name="accountName" placeholder="account" class="input-xlarge" value="" id="accountName" />
                            </div>
                        </div>

                        <div class="control-group">
                            <!-- Password-->
                            <label class="control-label" for="password">Password</label>
                            <div class="controls">
                                <input type="password" name="password" placeholder="password" class="input-xlarge" value="" id="password" />
                            </div>
                        </div>

                        <div class="control-group">
                            <!-- Button -->
                            <div class="controls">
                                <input type="submit" name="Login" value="Login" class="btn btn-success" id="Login" />
                            </div>
                        </div>
                    </fieldset>
                </form>
            </div>
        </div>


    </div>
</body>
</html>
4

1 回答 1

1

I don't know how is your .gsp code, but i passed for a problem similar with your.

I solve my problem updating the resource plugins version, like you can see in the post above:

Grails: Images / CSS missing from time to time

于 2013-08-04T16:32:19.867 回答