Skip to content
This repository has been archived by the owner on Jul 27, 2021. It is now read-only.

Commit

Permalink
updated boilerplate and jquery.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kashif Rasul committed Jul 2, 2011
1 parent 2ad374d commit 7adadcc
Show file tree
Hide file tree
Showing 8 changed files with 493 additions and 426 deletions.
143 changes: 58 additions & 85 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@
# Webfont access
# ----------------------------------------------------------------------

# allow access from all domains for webfonts
# alternatively you could only whitelist
# your subdomains like "sub.domain.com"
# Allow access from all domains for webfonts.
# Alternatively you could only whitelist your
# subdomains like "sub.domain.com".

<FilesMatch "\.(ttf|otf|eot|woff|font.css)$">
<IfModule mod_headers.c>
Expand All @@ -74,11 +74,11 @@
# Proper MIME type for all files
# ----------------------------------------------------------------------

# audio
# Audio
AddType audio/ogg oga ogg
AddType audio/mp4 m4a

# video
# Video
AddType video/ogg ogv
AddType video/mp4 mp4 m4v
AddType video/webm webm
Expand All @@ -88,13 +88,13 @@ AddType video/webm webm
AddType image/svg+xml svg svgz
AddEncoding gzip svgz

# webfonts
# Webfonts
AddType application/vnd.ms-fontobject eot
AddType font/truetype ttf
AddType application/x-font-ttf ttf ttc
AddType font/opentype otf
AddType application/x-font-woff woff

# assorted types
# Assorted types
AddType image/x-icon ico
AddType image/webp webp
AddType text/cache-manifest appcache manifest
Expand All @@ -113,11 +113,11 @@ AddType text/x-vcard vcf
# e.g. Inside of script.combined.js you could have
# <!--#include file="libs/jquery-1.5.0.min.js" -->
# <!--#include file="plugins/jquery.idletimer.js" -->
# and they would be included into this single file
# and they would be included into this single file.

# this is not in use in the boilerplate as it stands. you may
# choose to name your files in this way for this advantage
# or concatenate and minify them manually.
# This is not in use in the boilerplate as it stands. You may
# choose to name your files in this way for this advantage or
# concatenate and minify them manually.
# Disabled by default.

# <FilesMatch "\.combined\.(js|css)$">
Expand All @@ -128,26 +128,34 @@ AddType text/x-vcard vcf


# ----------------------------------------------------------------------
# gzip compression
# Gzip compression
# ----------------------------------------------------------------------

<IfModule mod_deflate.c>


# force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
# Force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s,?\s(gzip|deflate)?|X{4,13}|~{4,13}|-{4,13})$ HAVE_Accept-Encoding
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
</IfModule>
</IfModule>
# html, txt, css, js, json, xml, htc:

# HTML, TXT, CSS, JavaScript, JSON, XML, HTC:
<IfModule filter_module>
FilterDeclare COMPRESS
FilterProvider COMPRESS DEFLATE resp=Content-Type /text/(html|css|javascript|plain|x(ml|-component))/
FilterProvider COMPRESS DEFLATE resp=Content-Type /application/(javascript|json|xml|x-javascript)/
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/html
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/css
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/javascript
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/plain
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/x-component
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/javascript
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/json
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/x-javascript
FilterChain COMPRESS
FilterProtocol COMPRESS change=yes;byteranges=no
FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no
</IfModule>

<IfModule !mod_filter.c>
Expand All @@ -157,7 +165,7 @@ AddType text/x-vcard vcf
AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
</IfModule>

# webfonts and svg:
# Webfonts and SVG:
<FilesMatch "\.(ttf|otf|eot|svg)$" >
SetOutputFilter DEFLATE
</FilesMatch>
Expand All @@ -169,39 +177,39 @@ AddType text/x-vcard vcf
# Expires headers (for better cache control)
# ----------------------------------------------------------------------

# these are pretty far-future expires headers
# they assume you control versioning with cachebusting query params like
# These are pretty far-future expires headers.
# They assume you control versioning with cachebusting query params like
# <script src="application.js?20100608">
# additionally, consider that outdated proxies may miscache
# Additionally, consider that outdated proxies may miscache
# www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/

# if you don't use filenames to version, lower the css and js to something like
# "access plus 1 week" or so
# If you don't use filenames to version, lower the CSS and JS to something like
# "access plus 1 week" or so.

<IfModule mod_expires.c>
ExpiresActive on

# Perhaps better to whitelist expires rules? Perhaps.
ExpiresDefault "access plus 1 month"

# cache.appcache needs re-requests in FF 3.6 (thx Remy ~Introducing HTML5)
# cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
ExpiresByType text/cache-manifest "access plus 0 seconds"

# your document html
# Your document html
ExpiresByType text/html "access plus 0 seconds"

# data
# Data
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType application/json "access plus 0 seconds"

# rss feed
# RSS feed
ExpiresByType application/rss+xml "access plus 1 hour"

# favicon (cannot be renamed)
# Favicon (cannot be renamed)
ExpiresByType image/x-icon "access plus 1 week"

# media: images, video, audio
# Media: images, video, audio
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
Expand All @@ -211,17 +219,17 @@ AddType text/x-vcard vcf
ExpiresByType video/mp4 "access plus 1 month"
ExpiresByType video/webm "access plus 1 month"

# htc files (css3pie)
# HTC files (css3pie)
ExpiresByType text/x-component "access plus 1 month"

# webfonts
# Webfonts
ExpiresByType font/truetype "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"

# css and javascript
# CSS and JavaScript
ExpiresByType text/css "access plus 1 year"
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType text/javascript "access plus 1 year"
Expand Down Expand Up @@ -336,41 +344,6 @@ FileETag None



# ----------------------------------------------------------------------
# Add/remove trailing slash to (non-file) URLs
# ----------------------------------------------------------------------

# Google treats URLs with and without trailing slashes separately.
# Forcing a trailing slash is usually preferred, but all that's really
# important is that one correctly redirects to the other.

# By default option 1 (force trailing slash) is activated.
# http://googlewebmastercentral.blogspot.com/2010/04/to-slash-or-not-to-slash.html
# http://www.alistapart.com/articles/slashforward/
# http://httpd.apache.org/docs/2.0/misc/rewriteguide.html#url Trailing Slash Problem

# ----------------------------------------------------------------------

# Option 1:
# Rewrite "domain.com/foo -> domain.com/foo/"

<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/|#(.*))$
RewriteRule ^(.*)$ $1/ [R=301,L]
</IfModule>

# ----------------------------------------------------------------------

# Option 2:
# Rewrite "domain.com/foo/ -> domain.com/foo"

#<IfModule mod_rewrite.c>
# RewriteRule ^(.*)/$ $1 [R=301,L]
#</IfModule>



# ----------------------------------------------------------------------
# Built-in filename-based cache busting
# ----------------------------------------------------------------------
Expand Down Expand Up @@ -418,7 +391,7 @@ Options -MultiViews


# ----------------------------------------------------------------------
# custom 404 page
# Custom 404 page
# ----------------------------------------------------------------------

# You can add custom pages to handle 500 or 403 pretty easily, if you like.
Expand All @@ -430,10 +403,10 @@ ErrorDocument 404 /404.html
# UTF-8 encoding
# ----------------------------------------------------------------------

# use utf-8 encoding for anything served text/plain or text/html
# Use UTF-8 encoding for anything served text/plain or text/html
AddDefaultCharset utf-8

# force utf-8 for a number of file formats
# Force UTF-8 for a number of file formats
AddCharset utf-8 .html .css .js .xml .json .rss


Expand Down Expand Up @@ -479,44 +452,44 @@ Options -Indexes

# php_flag register_globals Off

# rename session cookie to something else, than PHPSESSID
# Rename session cookie to something else, than PHPSESSID
# php_value session.name sid

# do not show you are using php
# Do not show you are using php
# php_flag expose_php Off

# level of log detail - log all errors
# Level of log detail - log all errors
# php_value error_reporting -1

# write errors to log file
# Write errors to log file
# php_flag log_errors On

# do not display errors in browser (production - Off, development - On)
# Do not display errors in browser (production - Off, development - On)
# php_flag display_errors Off

# do not display startup errors (production - Off, development - On)
# Do not display startup errors (production - Off, development - On)
# php_flag display_startup_errors Off

# format errors in plain text
# Format errors in plain text
# php_flag html_errors Off

# show multiple occurrence of error
# Show multiple occurrence of error
# php_flag ignore_repeated_errors Off

# show same errors from different sources
# Show same errors from different sources
# php_flag ignore_repeated_source Off

# size limit for error messages
# Size limit for error messages
# php_value log_errors_max_len 1024

# don't precede error with string (doesn't accept empty string, use whitespace if you need)
# Don't precede error with string (doesn't accept empty string, use whitespace if you need)
# php_value error_prepend_string " "

# don't prepend to error (doesn't accept empty string, use whitespace if you need)
# Don't prepend to error (doesn't accept empty string, use whitespace if you need)
# php_value error_append_string " "

# Increase cookie security
<IfModule php5_module>
php_value session.cookie_httponly true
php_value session.cookie_httponly true
</IfModule>

16 changes: 12 additions & 4 deletions _Layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<head>
<meta charset="utf-8">

<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
Remove this if you use the .htaccess -->
<!-- Use the .htaccess and remove these lines to avoid edge case issues.
More info: h5bp.com/b/378 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

<title>SpacialDB DevCenter: {{ page.title }}</title>
Expand Down Expand Up @@ -69,8 +69,8 @@ <h1>{{ page.title }}</h1>
<!-- JavaScript at the bottom for fast page loading -->

<!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if offline -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.6.1.min.js"><\/script>')</script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.6.2.min.js"><\/script>')</script>

<!-- scripts concatenated and minified via ant build script-->
<script src="js/plugins.js"></script>
Expand Down Expand Up @@ -104,5 +104,13 @@ <h1>{{ page.title }}</h1>
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>


<!-- Prompt IE 6 users to install Chrome Frame. Remove this if you want to support IE 6.
chromium.org/developers/how-tos/chrome-frame-getting-started -->
<!--[if lt IE 7 ]>
<script src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js"></script>
<script>window.attachEvent("onload",function(){CFInstall.check({mode:"overlay"})})</script>
<![endif]-->

</body>
</html>

0 comments on commit 7adadcc

Please sign in to comment.