Click here to Skip to main content
15,892,674 members
Articles / Web Development / HTML5

A Very Simple Example of HTML 5 OFFLINE Database (indexedDB and WebSql)

Rate me:
Please Sign up or sign in to vote.
4.80/5 (21 votes)
18 Sep 2014CPOL4 min read 148.7K   7.8K   39  
This article explains the basic knowledge about the browser databases that comes in handy when working with the HTML 5 Offline application to create, edit, modify or delete the data of a table in databases (indexedDB and WebSql).
param($installPath, $toolsPath, $package, $project)

. (Join-Path $toolsPath common.ps1)

# Determine the file paths
$projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName
$origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName

if (Test-Path $projectIntelliSenseFilePath) {
    if ((Get-Checksum $projectIntelliSenseFilePath) -eq (Get-Checksum $origIntelliSenseFilePath)) {
        # The intellisense file in the project matches the file in the tools folder, delete it
        
        if ($scriptsFolderProjectItem -eq $null) {
            # No Scripts folder
            exit
        }

        try {        
            # Get the project item for the intellisense file
            $intelliSenseFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item($intelliSenseFileName)
        }
        catch {
            # The item wasn't found
            exit
        }

        # Delete the project item
        Delete-ProjectItem $intelliSenseFileProjectItem
    }
    else {
        $projectScriptsFolderLeaf = Split-Path $projectScriptsFolderPath -Leaf
        Write-Host "Skipping '$projectScriptsFolderLeaf\$intelliSenseFileName' because it was modified." -ForegroundColor Magenta
    }
}
else {
    # The intellisense file was not found in project
    Write-Host "The intellisense file was not found in project at path $projectIntelliSenseFilePath"
}

# Update the _references.js file
Remove-Reference $scriptsFolderProjectItem $jqueryFileNameRegEx

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Team Leader
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions